philsupertramp/game-math
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
MonomBase Class Reference

#include <SupportValues.h>

Inheritance diagram for MonomBase:
PolynomialBase

Public Member Functions

 MonomBase (const Matrix< double > &X, const Matrix< double > &Y)
 
virtual Matrix< double > Evaluate (const Matrix< double > &X) const
 
virtual std::string Function () const
 
- Public Member Functions inherited from PolynomialBase
 PolynomialBase (const Matrix< double > &X, const Matrix< double > &Y)
 
virtual Matrix< double > Evaluate (const Matrix< double > &) const =0
 
virtual std::string Function () const =0
 

Public Attributes

Matrix< double > A
 Coefficient matrix. More...
 

Detailed Description

Monom-Base:

$$y_i = p(x_i) = a_0 + a_1x_i + ... + a_nx_i^n, \forall i = 0, \dots, n$$ https://wiki.godesteem.de/wiki/interpolation-and-approximation/#Monom-Base

Examples
numerics/analysis/TestSupportValues.cpp.

Constructor & Destructor Documentation

◆ MonomBase()

MonomBase::MonomBase ( const Matrix< double > &  X,
const Matrix< double > &  Y 
)
inline

Default constructor

Parameters
X$$x_i$$ support values
Y$$y_i$$ support values evaluated with function

quick test if everything is right, if det(out) = 1 we made some mistake computing the vandermonde-matrix per definition it's determinant is always \neq 0!

Member Function Documentation

◆ Evaluate()

virtual Matrix< double > MonomBase::Evaluate ( const Matrix< double > &  X) const
inlinevirtual

iterative evaluation, nothing special

Parameters
Xevaluation values
Returns
approximation

Implements PolynomialBase.

◆ Function()

virtual std::string MonomBase::Function ( ) const
inlinevirtual

String representation getter

Returns
string representation in monom base

Implements PolynomialBase.

Member Data Documentation

◆ A

Matrix<double> MonomBase::A

Coefficient matrix.

Examples
numerics/analysis/TestSupportValues.cpp.

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