public DoubleFft1d(int n){
  if (n < 1) {
    throw new IllegalArgumentException("n must be greater than 0");
  }
  this.n=n;
  if (!ConcurrencyUtils.isPowerOf2(n)) {
    if (getReminder(n,factors) >= 211) {
      plan=Plans.BLUESTEIN;
      nBluestein=ConcurrencyUtils.nextPow2(n * 2 - 1);
      bk1=new double[2 * nBluestein];
      bk2=new double[2 * nBluestein];
      this.ip=new int[2 + (int)Math.ceil(2 + (1 << (int)(Math.log(nBluestein + 0.5) / Math.log(2)) / 2))];
      this.w=new double[nBluestein];
      int twon=2 * nBluestein;
      nw=ip[0];
      if (twon > (nw << 2)) {
        nw=twon >> 2;
        makewt(nw);
      }
      nc=ip[1];
      if (nBluestein > (nc << 2)) {
        nc=nBluestein >> 2;
        makect(nc,w,nw);
      }
      bluesteini();
    }
 else {
      plan=Plans.MIXED_RADIX;
      wtable=new double[4 * n + 15];
      wtable_r=new double[2 * n + 15];
      cffti();
      rffti();
    }
  }
 else {
    plan=Plans.SPLIT_RADIX;
    this.ip=new int[2 + (int)Math.ceil(2 + (1 << (int)(Math.log(n + 0.5) / Math.log(2)) / 2))];
    this.w=new double[n];
    int twon=2 * n;
    nw=ip[0];
    if (twon > (nw << 2)) {
      nw=twon >> 2;
      makewt(nw);
    }
    nc=ip[1];
    if (n > (nc << 2)) {
      nc=n >> 2;
      makect(nc,w,nw);
    }
  }
}

public DoubleFft1d ( int n ) { if ( n < 1 ) { throw new IllegalArgumentException ( "n must be greater than 0" ) ; } this . n = n ; if ( ! ConcurrencyUtils . isPowerOf2 ( n ) ) { if ( getReminder ( n , factors ) >= 211 ) { plan = Plans . BLUESTEIN ; nBluestein = ConcurrencyUtils . nextPow2 ( n * 2 - 1 ) ; bk1 = new double [ 2 * nBluestein ] ; bk2 = new double [ 2 * nBluestein ] ; this . ip = new int [ 2 + ( int ) Math . ceil ( 2 + ( 1 << ( int ) ( Math . log ( nBluestein + 0.5 ) / Math . log ( 2 ) ) / 2 ) ) ] ; this . w = new double [ nBluestein ] ; int twon = 2 * nBluestein ; nw = ip [ 0 ] ; if ( twon > ( nw << 2 ) ) { nw = twon > > 2 ; makewt ( nw ) ; } nc = ip [ 1 ] ; if ( nBluestein > ( nc << 2 ) ) { nc = nBluestein > > 2 ; makect ( nc , w , nw ) ; } bluesteini ( ) ; } else { plan = Plans . MIXED_RADIX ; wtable = new double [ 4 * n + 15 ] ; wtable_r = new double [ 2 * n + 15 ] ; cffti ( ) ; rffti ( ) ; } } else { plan = Plans . SPLIT_RADIX ; this . ip = new int [ 2 + ( int ) Math . ceil ( 2 + ( 1 << ( int ) ( Math . log ( n + 0.5 ) / Math . log ( 2 ) ) / 2 ) ) ] ; this . w = new double [ n ] ; int twon = 2 * n ; nw = ip [ 0 ] ; if ( twon > ( nw << 2 ) ) { nw = twon > > 2 ; makewt ( nw ) ; } nc = ip [ 1 ] ; if ( n > ( nc << 2 ) ) { nc = n > > 2 ; makect ( nc , w , nw ) ; } } }
creates new instance of doublefft_1d .
