Here you can find the source of multiplyAndSum(double[] r1, double[] r2)
public static double multiplyAndSum(double[] r1, double[] r2)
//package com.java2s; //License from project: Open Source License public class Main { public static double multiplyAndSum(double[] r1, double[] r2) { double ret = 0; for (int i = 0; i < r1.length; i++) { ret += r1[i] * r2[i];//from w w w . j a va 2 s .c o m } return ret; } }