35#ifndef STK_TRIGONOMETRICCOEFFICIENTS_H
36#define STK_TRIGONOMETRICCOEFFICIENTS_H
46template<
class Data,
class Coefs = ArrayXX>
51 typedef typename Data::Type
Type;
90template<
class Data,
class Coefs>
102 coefficients_.col(0) =
Type(1);
104 for(
int j=1;
j<coefficients_.endCols();
j += 2)
106 coefficients_.col(
j) = (*p_data_ *
Type(
j)*
period).cos();
107 if (
j+1 < coefficients_.endCols())
108 coefficients_.col(
j+1) = (*p_data_ *
Type(
j)*
period).sin();
In this file we define the Interface class IBasis for basis functions.
#define STKERROR_NO_ARG(Where, Error)
Interface base class for all basis function.
Data const * p_data_
the input data set
Type minValue_
Minimal value of the data.
Type maxValue_
Maximal value of the data.
int dim_
number of dimension to build
Coefs coefficients_
Array2D of the coefficients.
virtual bool initializeStep()
perform any computation needed before the call of the regression method.
String msg_error_
String with the last error message.
bool hasRun_
true if run has been used, false otherwise
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
TrigonometricCoefficients class allows to compute the coefficients of a sampled function using sines ...
TrigonometricCoefficients(Data const *p_data=0, int dim=1, bool useDataValues=true)
default constructor
TrigonometricCoefficients * clone() const
clone pattern implementation
virtual ~TrigonometricCoefficients()
Destructor.
TrigonometricCoefficients(TrigonometricCoefficients const &coefs)
copy constructor.
virtual bool run()
run the computations.
IBasis< Data, Coefs > Base
TrigonometricCoefficients(Data const &data, int dim, bool useDataValues=true)
constructor
The namespace STK is the main domain space of the Statistical ToolKit project.