Here you can find the source of multiply(double[] a, double v)
Parameter | Description |
---|---|
a | the vector. |
v | the constant. |
public static void multiply(double[] a, double v)
//package com.java2s; //License from project: Apache License public class Main { /**/*from ww w . j av a 2 s . c om*/ * Multiplies a constant to all elements in the array. * * @param a the vector. * @param v the constant. */ public static void multiply(double[] a, double v) { for (int i = 0; i < a.length; i++) { a[i] *= v; } } }