isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Public Attributes | List of all members
isce3::core::Poly1d Class Reference

Data structure for representing 1D polynomials. More...

#include <Poly1d.h>

Public Member Functions

 Poly1d (int ord, double mn, double nm)
 Constructor. More...
 
 Poly1d ()
 Empty constructor.
 
 Poly1d (const Poly1d &p)
 Copy constructor.
 
Poly1doperator= (const Poly1d &)
 Assignment operator.
 
void setCoeff (int ind, double val)
 Set coefficient by index. More...
 
double getCoeff (int ind) const
 Get coefficient by index. More...
 
double eval (double x) const
 Evaluate polynomial at x. More...
 
void printPoly () const
 Print for debugging.
 
Poly1d derivative () const
 Return derivative of polynomial.
 

Public Attributes

int order
 Order of the polynomial.
 
double mean
 Mean of the polynomial.
 
double norm
 Norm of the polynomial.
 
std::vector< double > coeffs
 Coefficients of the polynomial.
 

Detailed Description

Data structure for representing 1D polynomials.

Poly1D is function of the form

\[ f\left( x \right) = \sum_{i=0}^{N} a_i \cdot \left( \frac{x-\mu}{\sigma} \right)^i \]

where \(a_i\) represents the coefficients, \(\mu\) represents the mean and \(\sigma\) represents the norm

Constructor & Destructor Documentation

isce3::core::Poly1d::Poly1d ( int  ord,
double  mn,
double  nm 
)
inline

Constructor.

Parameters
[in]ordOrder
[in]mnMean
[in]nmNorm

Member Function Documentation

double isce3::core::Poly1d::eval ( double  x) const

Evaluate polynomial at x.

Parameters
[in]xInput x
double isce3::core::Poly1d::getCoeff ( int  ind) const
inline

Get coefficient by index.

Parameters
[in]indIndex to get
void isce3::core::Poly1d::setCoeff ( int  ind,
double  val 
)
inline

Set coefficient by index.

Parameters
[in]indIndex to set
[in]valCoefficient value

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

Generated for ISCE3.0 by doxygen 1.8.5.