final int N = szData; // vector/matrix dimensions
// Compute the z transform generator
Double h = 2.0*Math.PI/N;
Complex zf = new Complex(Math.cos(h), -Math.sin(h));
Complex zi = new Complex(Math.cos(h), Math.sin(h));
// Create matrix kernel and compute element values
final double c = Math.sqrt(1.0/N); // normalization constant
ComplexSquareMatrix Kf = new ComplexSquareMatrix( N );
ComplexSquareMatrix Ki = new ComplexSquareMatrix( N );
Complex kf, ki; // matrix kernel element values
Complex zfm = Complex.ONE;
Complex zim = Complex.ONE;
for (int m=0; m<N; m++) {
kf = zfm.multiply(c);
ki = zim.multiply(c);
for (int n=m; n<N; n++) {
Kf.setElement(m, n, kf);
Kf.setElement(n, m, kf);
Ki.setElement(m, n, ki);
Ki.setElement(n, m, ki);
kf = kf.multiply(zfm);
ki = ki.multiply(zim);
}
zfm = zfm.multiply(zf);
zim = zim.multiply(zi);
}
this.szData = N;
this.cpxZ = zi;
this.matKerFwd = Kf;