Here you can find the source of arrayMultiply(double[] a, double[] b)
Parameter | Description |
---|---|
a | - the first vector of doubles. |
b | - the second vector of doubles. |
public static double[] arrayMultiply(double[] a, double[] b)
//package com.java2s; public class Main { /**/*from ww w .j a v a2 s . c o m*/ * Multiplies two vectors of doubles, array-wise. * @param a - the first vector of doubles. * @param b - the second vector of doubles. * @return the result of multiplying two vectors of doubles. */ public static double[] arrayMultiply(double[] a, double[] b) { double[] out = new double[a.length]; for (int i = 0; i < a.length; i++) { out[i] = a[i] * b[i]; } return out; } }