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