1.6.0
CCC
 
Loading...
Searching...
No Matches
ClassicalPolynomial Class Reference

#include <ClassicalPolynomial.hpp>

Inheritance diagram for ClassicalPolynomial:
APolynomial AStringable ICloneable

Public Member Functions

 ClassicalPolynomial ()
 
 ClassicalPolynomial (const VectorDouble &)
 
virtual ~ClassicalPolynomial ()
 
double eval (double x) const override
 ICloneable interface.
 
void evalOpTraining (MatrixSparse *Op, const constvect inv, std::vector< std::vector< double > > &store, std::vector< double > &work) const override
 
void evalOpCumul (MatrixSparse *Op, const constvect inv, vect outv) const
 
void evalOp (MatrixSparse *Op, const constvect inv, vect outv) const override
 
double evalOpByRank (MatrixSparse *S, int rank) const override
 Returns the rank-th term of the Diagonal of 'Op' in its Polynomail expression through Horner mechanism It is similar to the method 'evalOp' but targets the diagonal only.
 
void _addEvalOp (ALinearOp *Op, const constvect inv, vect outv) const override
 
- Public Member Functions inherited from APolynomial
 APolynomial ()
 
 APolynomial (const VectorDouble &coeffs)
 
 APolynomial (const APolynomial &m)
 
APolynomialoperator= (const APolynomial &p)
 
virtual ~APolynomial ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 Interface for AStringable.
 
void init (const VectorDouble &coeffs)
 
virtual void evalOp (MatrixSparse *Op, const VectorDouble &inv, VectorDouble &outv) const
 
VectorDouble evalOp (MatrixSparse *Op, const constvect inv) const
 
void addEvalOp (ALinearOp *Op, const constvect inv, vect outv) const
 
VectorDouble getCoeffs () const
 
void setCoeffs (const VectorDouble &coeffs)
 
int getDegree () const
 
virtual int fit (const std::function< double(double)> &f, double from=0., double to=1., double tol=EPSILON5)
 
- 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
 

Constructor & Destructor Documentation

◆ ClassicalPolynomial() [1/2]

ClassicalPolynomial::ClassicalPolynomial ( )

◆ ClassicalPolynomial() [2/2]

ClassicalPolynomial::ClassicalPolynomial ( const VectorDouble coeffs)

◆ ~ClassicalPolynomial()

ClassicalPolynomial::~ClassicalPolynomial ( )
virtual

Member Function Documentation

◆ _addEvalOp()

void ClassicalPolynomial::_addEvalOp ( ALinearOp Op,
const constvect  inv,
vect  outv 
) const
overridevirtual

Implements APolynomial.

◆ eval()

double ClassicalPolynomial::eval ( double  x) const
overridevirtual

ICloneable interface.

Implements APolynomial.

◆ evalOp()

void ClassicalPolynomial::evalOp ( MatrixSparse Op,
const constvect  inv,
vect  outv 
) const
overridevirtual

Implements APolynomial.

◆ evalOpByRank()

double ClassicalPolynomial::evalOpByRank ( MatrixSparse S,
int  rank 
) const
overridevirtual

Returns the rank-th term of the Diagonal of 'Op' in its Polynomail expression through Horner mechanism It is similar to the method 'evalOp' but targets the diagonal only.

Parameters
STarget Sparse matrix (possibly not even concretized)
rankRank of the target
Returns
double

Reimplemented from APolynomial.

◆ evalOpCumul()

void ClassicalPolynomial::evalOpCumul ( MatrixSparse Op,
const constvect  inv,
vect  outv 
) const

◆ evalOpTraining()

void ClassicalPolynomial::evalOpTraining ( MatrixSparse Op,
const constvect  inv,
std::vector< std::vector< double > > &  store,
std::vector< double > &  work 
) const
overridevirtual

Reimplemented from APolynomial.


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