Here you can find the source of arrayDot(final Double[] first, final Double[] second)
Parameter | Description |
---|---|
first | First array: a |
second | Second array: b |
public static Double[] arrayDot(final Double[] first, final Double[] second)
//package com.java2s; //License from project: Apache License public class Main { /**// ww w . ja va 2s . c o m * multiplies the elements of the arrays. * * @param first First array: a * @param second Second array: b * @return new array with elements e: e_i = a_i * b_i */ public static Double[] arrayDot(final Double[] first, final Double[] second) { final Double[] toret = new Double[first.length]; for (int i = 0; i < first.length; i++) { toret[i] = first[i] * second[i]; } return toret; } }