Relacs Numerics Library  0.9.8
Public Member Functions | List of all members
Sine Class Reference

#include <basisfunction.h>

Inheritance diagram for Sine:
Inheritance graph
[legend]
Collaboration diagram for Sine:
Collaboration graph
[legend]

Public Member Functions

 Sine (void)
 
 Sine (double freq, double phase=0.0)
 
virtual ~Sine (void)
 
double frequency (void) const
 
void setFrequency (double freq)
 
double phase (void) const
 
void setPhase (double phase)
 
void operator() (double x, ArrayD &y) const
 
virtual void basis (double x, ArrayD &y) const
 
double operator() (const ArrayD &c, double x) const
 
virtual double value (const ArrayD &c, double x) const
 
- Public Member Functions inherited from BasisFunction
 BasisFunction (void)
 
virtual ~BasisFunction (void)
 
void operator() (double x, ArrayD &y) const
 
double operator() (const ArrayD &c, double x) const
 

Detailed Description

A sine basis function.

Author
Jan Benda
Version
1.0

\[ f_i(x) = sin( 2 \pi f i x + \varphi ) \]

\[ f(x) = \sum_{i=0}^n c_i sin( 2 \pi f i x + \varphi ) \]

Constructor & Destructor Documentation

Sine ( void  )
Sine ( double  freq,
double  phase = 0.0 
)
~Sine ( void  )
virtual

Member Function Documentation

double frequency ( void  ) const

The frequency of the sine functions.

void setFrequency ( double  freq)

Set the frequency of the sine functions to freq.

double phase ( void  ) const

The phase of the sine functions.

Referenced by Sine::setPhase().

void setPhase ( double  phase)

Set the phase of the sine functions to phase.

References Sine::phase().

void operator() ( double  x,
ArrayD y 
) const

Returns the values of the first y.size() basis functions at position x in y. This operator is NOT virtual in order to speed up computation when using templates. If you need a virtual function as an interface, implement basis().

References relacs::sin(), and Array< T >::size().

Referenced by Sine::basis(), and Sine::value().

void basis ( double  x,
ArrayD y 
) const
virtual

Returns the values of the first y.size() basis functions at position x in y. This function IS virtual and might slow things down. If you need a NON virtual function as an interface, implement operator().

Reimplemented from BasisFunction.

References Sine::operator()().

double operator() ( const ArrayD c,
double  x 
) const

Returns the linear combination of the first c.size() basis functions at position x with coefficients c. This operator is NOT virtual in order to speed up computation when using templates. If you need a virtual function as an interface, implement value().

References Array< T >::empty(), relacs::sin(), and Array< T >::size().

double value ( const ArrayD c,
double  x 
) const
virtual

Returns the linear combination of the first c.size() basis functions at position x with coefficients c. This function IS virtual and might slow things down. If you need a NON virtual function as an interface, implement operator().

Reimplemented from BasisFunction.

References Sine::operator()().


The documentation for this class was generated from the following files: