Here you can find the source of multiply(double[] a, double[] b)
public static final double[] multiply(double[] a, double[] b)
//package com.java2s; //License from project: Apache License public class Main { public static final double[] multiply(double[] a, double[] b) { double[] out = new double[a.length]; for (int i = 0; i < a.length; i++) { out[i] = a[i] * b[i];/*from w w w. ja va 2s . c o m*/ } return out; } public static final float[] multiply(float[] a, float[] b) { float[] out = new float[a.length]; for (int i = 0; i < a.length; i++) { out[i] = a[i] * b[i]; } return out; } public static final int[] multiply(int[] a, int[] b) { int[] out = new int[a.length]; for (int i = 0; i < a.length; i++) { out[i] = a[i] * b[i]; } return out; } public static final long[] multiply(long[] a, long[] b) { long[] out = new long[a.length]; for (int i = 0; i < a.length; i++) { out[i] = a[i] * b[i]; } return out; } public static final double[] multiply(double[] in, double val) { double[] out = new double[in.length]; for (int i = 0; i < in.length; i++) { out[i] = in[i] * val; } return out; } public static final float[] multiply(float[] in, float val) { float[] out = new float[in.length]; for (int i = 0; i < in.length; i++) { out[i] = in[i] * val; } return out; } public static final void multiply(float[][][][] img, float val) { for (int i = 0; i < img.length; i++) for (int j = 0; j < img[0].length; j++) for (int k = 0; k < img[0][0].length; k++) for (int l = 0; l < img[0][0][0].length; l++) { img[i][j][k][l] *= val; } } public static final void multiply(float[][][][] img, double val) { for (int i = 0; i < img.length; i++) for (int j = 0; j < img[0].length; j++) for (int k = 0; k < img[0][0].length; k++) for (int l = 0; l < img[0][0][0].length; l++) { img[i][j][k][l] *= val; } } public static final void multiply(float[][][] img, float val) { for (int i = 0; i < img.length; i++) for (int j = 0; j < img[0].length; j++) for (int k = 0; k < img[0][0].length; k++) { img[i][j][k] *= val; } } public static final void multiply(float[][][] img, double val) { for (int i = 0; i < img.length; i++) for (int j = 0; j < img[0].length; j++) for (int k = 0; k < img[0][0].length; k++) { img[i][j][k] *= val; } } }