Java Array Multiply multiplyComplexVectors(float[] cA, float[] cB, long limit)

Here you can find the source of multiplyComplexVectors(float[] cA, float[] cB, long limit)

Description

multiply Complex Vectors

License

Open Source License

Declaration

private static float[] multiplyComplexVectors(float[] cA, float[] cB,
            long limit) 

Method Source Code

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

public class Main {
    private static float[] multiplyComplexVectors(float[] cA, float[] cB,
            long limit) {
        assert limit * 2 == cA.length;
        for (int i = 0; i < limit; i++) {
            float realA = cA[i * 2];
            float imA = cA[i * 2 + 1];
            float realB = cB[i * 2];
            float imB = cB[i * 2 + 1];

            cA[i * 2] = realA * realB - imA * imB;
            cA[i * 2 + 1] = realA * imB + imA * realB;
        }/*from   w  w w  .  j ava 2 s  .co m*/
        return cA;
    }
}

Related

  1. multiplyAndSum(final double[] d, final double scale)
  2. multiplyArray(float[] array, float num)
  3. multiplyByScalar(double scalar, double[] vector)
  4. multiplyBytes(byte[] in, int count, int mul)
  5. multiplyComplex(double[] one, double[] two)
  6. multiplycst(int k, double[] t)
  7. multiplyElementwise(double[] a, int[] b)
  8. multiplyHarmonics(float[] powerSpectrumInOut, int nHarmonics)
  9. multiplyInPlace(double[] img, double val)