gstlearn  1.0.0
CCC
Chebychev Class Reference

TODO : Dependency to csparse to be removed. More...

#include <Chebychev.hpp>

Inheritance diagram for Chebychev:
APolynomial AStringable ICloneable

Public Member Functions

 Chebychev ()
 
virtual ~Chebychev ()
 
void evalOp (cs *Op, const VectorDouble &inv, VectorDouble &outv) const override
 ICloneable interface. More...
 
void evalOp (const ALinearOpMulti *Op, const VectorVectorDouble &inv, VectorVectorDouble &outv) const override
 
double eval (double x) const override
 
int fit (std::function< double(double)> f, double a=0., double b=1., double tol=EPSILON5) override
 
void init (int ncMax=10001, int nDisc=100, double a=0., double b=1., bool verbose=false)
 
void setCoeffs (const VectorDouble &coeffs)
 
int getNcMax () const
 
int getNDisc () const
 
double getA () const
 
double getB () const
 
bool getVerbose () const
 
void setA (double a)
 
void setB (double b)
 
void setNcMax (int ncMax)
 
void setNDisc (int nDisc)
 
void setVerbose (bool verbose)
 
int fit2 (AFunction *f, double a=0., double b=1., double tol=EPSILON5)
 
- Public Member Functions inherited from APolynomial
 APolynomial ()
 
 APolynomial (VectorDouble coeffs)
 
 APolynomial (const APolynomial &p)
 
APolynomialoperator= (const APolynomial &p)
 
virtual ~APolynomial ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 Interface for AStringable. More...
 
void init (VectorDouble coeffs)
 
virtual void evalOpTraining (cs *Op, const VectorDouble &inv, VectorVectorDouble &outv, VectorDouble &work) const
 
VectorDouble evalOp (cs *Op, const VectorDouble &inv) const
 
VectorDouble getCoeffs () const
 
void setCoeffs (const VectorDouble coeffs)
 
int getDegree () const
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 
- Public Member Functions inherited from ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 

Static Public Member Functions

static ChebychevcreateFromCoeffs (const VectorDouble coeffs)
 

Private Member Functions

bool _isReady () const
 
void _fillCoeffs (std::function< double(double)>, double a, double b)
 
int _countCoeffs (std::function< double(double)> f, double x, double a, double b, double tol=EPSILON5) const
 

Private Attributes

int _ncMax
 
int _nDisc
 
double _a
 
double _b
 
bool _verbose
 

Additional Inherited Members

- Protected Attributes inherited from APolynomial
VectorDouble _coeffs
 

Detailed Description

TODO : Dependency to csparse to be removed.

Constructor & Destructor Documentation

◆ Chebychev()

Chebychev::Chebychev ( )

◆ ~Chebychev()

Chebychev::~Chebychev ( )
virtual

Member Function Documentation

◆ _countCoeffs()

int Chebychev::_countCoeffs ( std::function< double(double)>  f,
double  x,
double  a,
double  b,
double  tol = EPSILON5 
) const
private

◆ _fillCoeffs()

void Chebychev::_fillCoeffs ( std::function< double(double)>  f,
double  a,
double  b 
)
private

◆ _isReady()

bool Chebychev::_isReady ( ) const
inlineprivate

◆ createFromCoeffs()

Chebychev * Chebychev::createFromCoeffs ( const VectorDouble  coeffs)
static

◆ eval()

double Chebychev::eval ( double  x) const
overridevirtual

Implements APolynomial.

◆ evalOp() [1/2]

void Chebychev::evalOp ( const ALinearOpMulti Op,
const VectorVectorDouble inv,
VectorVectorDouble outv 
) const
overridevirtual

Implements APolynomial.

◆ evalOp() [2/2]

void Chebychev::evalOp ( cs *  Op,
const VectorDouble inv,
VectorDouble outv 
) const
overridevirtual

ICloneable interface.

Interface for Apolynomial

Reimplemented from APolynomial.

◆ fit()

int Chebychev::fit ( std::function< double(double)>  f,
double  a = 0.,
double  b = 1.,
double  tol = EPSILON5 
)
overridevirtual

Reimplemented from APolynomial.

◆ fit2()

int Chebychev::fit2 ( AFunction f,
double  a = 0.,
double  b = 1.,
double  tol = EPSILON5 
)

◆ getA()

double Chebychev::getA ( ) const
inline

◆ getB()

double Chebychev::getB ( ) const
inline

◆ getNcMax()

int Chebychev::getNcMax ( ) const
inline

◆ getNDisc()

int Chebychev::getNDisc ( ) const
inline

◆ getVerbose()

bool Chebychev::getVerbose ( ) const
inline

◆ init()

void Chebychev::init ( int  ncMax = 10001,
int  nDisc = 100,
double  a = 0.,
double  b = 1.,
bool  verbose = false 
)

◆ setA()

void Chebychev::setA ( double  a)
inline

◆ setB()

void Chebychev::setB ( double  b)
inline

◆ setCoeffs()

void Chebychev::setCoeffs ( const VectorDouble coeffs)
inline

◆ setNcMax()

void Chebychev::setNcMax ( int  ncMax)
inline

◆ setNDisc()

void Chebychev::setNDisc ( int  nDisc)
inline

◆ setVerbose()

void Chebychev::setVerbose ( bool  verbose)
inline

Member Data Documentation

◆ _a

double Chebychev::_a
private

◆ _b

double Chebychev::_b
private

◆ _ncMax

int Chebychev::_ncMax
private

◆ _nDisc

int Chebychev::_nDisc
private

◆ _verbose

bool Chebychev::_verbose
private

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