Examples of imag()


Examples of com.nr.fft.WrapVecDoub.imag()

    System.out.println("Testing WrapVecDoub[], interface1");

    WrapVecDoub data = new WrapVecDoub(2*N);
    for (i=0;i<N;i++) data.set(i,new Complex(2*i,2*i+1));
    for (i=0;i<N;i++)
      localflag = localflag || (data.real(i) != 2*i) || (data.imag(i) != 2*i+1);
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** WrapVecDoub[], interface1: Failure to write complex, and read with .real() and .imag()");
     
    }
View Full Code Here

Examples of com.nr.fft.WrapVecDoub.imag()

    double[] dat = new double[2*N];
    for (i=0;i<2*N;i++) dat[i]=i;
    WrapVecDoub data2 = new WrapVecDoub(dat);

    for (i=0;i<N;i++)
      localflag = localflag || (data2.real(i) != 2*i) || (data2.imag(i) != 2*i+1);
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** WrapVecDoub[], interface2: Incorrect values recovered with .real() and .imag() from initialized WrapVecDoub[]");
     
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.