package shtick.math; ////////////////////////////////////////////////////// //**************************************************// //* FourierBasis Class *// //* *// //* Version 1.2 *// //* Author: Sean M. Cox *// //* Organization: The Shtick *// //* http://www.smcox.com/ *// //* *// //* Contructs a basis for a sine and cosine space *// //* useful for data of a given length provided in *// //* to the class in the constructor. This class *// //* was created and implemented in order to *// //* optimize calculations in arrays of *// //* FourierSeries classes translating data sets of *// //* equal length. *// //* *// //**************************************************// ////////////////////////////////////////////////////// public class FourierBasis{ private double[][] sineBasis; private double[][] cosineBasis; public FourierBasis(int dataLength){ int harmonics=dataLength/2; sineBasis=new double[harmonics+1][dataLength]; cosineBasis=new double[harmonics+1][dataLength]; for(int j=0;j