Java Array Multiply multiplycst(int k, double[] t)

Here you can find the source of multiplycst(int k, double[] t)

Description

multiplycst

License

Open Source License

Declaration

static public double[] multiplycst(int k, double[] t) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    static public double[] multiplycst(int k, double[] t) {
        if (t == null) {
            System.err.println("empty array for multiplying by constant");
            return null;
        } else {//from   w ww .j a v a  2  s  .c  om
            double[] res = new double[t.length];
            for (int i = 0; i < t.length; i++) {
                res[i] = t[i] * k;
            }
            return res;
        }
    }
}

Related

  1. multiplyArray(float[] array, float num)
  2. multiplyByScalar(double scalar, double[] vector)
  3. multiplyBytes(byte[] in, int count, int mul)
  4. multiplyComplex(double[] one, double[] two)
  5. multiplyComplexVectors(float[] cA, float[] cB, long limit)
  6. multiplyElementwise(double[] a, int[] b)
  7. multiplyHarmonics(float[] powerSpectrumInOut, int nHarmonics)
  8. multiplyInPlace(double[] img, double val)
  9. multiplyInto(double[] out, double[] a, double[] b)