ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Polynomial< Degree > Class Template Reference

#include <Polynomial.h>

Public Member Functions

 Polynomial (void)
 
template<int Degree2>
 Polynomial (const Polynomial< Degree2 > &P)
 
double operator() (double t) const
 
double integral (double tMin, double tMax) const
 
int operator== (const Polynomial &p) const
 
int operator!= (const Polynomial &p) const
 
int isZero (void) const
 
void setZero (void)
 
template<int Degree2>
Polynomialoperator= (const Polynomial< Degree2 > &p)
 
Polynomialoperator+= (const Polynomial &p)
 
Polynomialoperator-= (const Polynomial &p)
 
Polynomial operator- (void) const
 
Polynomial operator+ (const Polynomial &p) const
 
Polynomial operator- (const Polynomial &p) const
 
template<int Degree2>
Polynomial< Degree+Degree2 > operator* (const Polynomial< Degree2 > &p) const
 
Polynomialoperator+= (double s)
 
Polynomialoperator-= (double s)
 
Polynomialoperator*= (double s)
 
Polynomialoperator/= (double s)
 
Polynomial operator+ (double s) const
 
Polynomial operator- (double s) const
 
Polynomial operator* (double s) const
 
Polynomial operator/ (double s) const
 
Polynomial scale (double s) const
 
Polynomial shift (double t) const
 
Polynomial< Degree-1 > derivative (void) const
 
Polynomial< Degree+1 > integral (void) const
 
void printnl (void) const
 
PolynomialaddScaled (const Polynomial &p, double scale)
 
void getSolutions (double c, std::vector< double > &roots, double EPS) const
 
int getSolutions (double c, double *roots, double EPS) const
 

Static Public Member Functions

static void Negate (const Polynomial &in, Polynomial &out)
 
static void Subtract (const Polynomial &p1, const Polynomial &p2, Polynomial &q)
 
static void Scale (const Polynomial &p, double w, Polynomial &q)
 
static void AddScaled (const Polynomial &p1, double w1, const Polynomial &p2, double w2, Polynomial &q)
 
static void AddScaled (const Polynomial &p1, const Polynomial &p2, double w2, Polynomial &q)
 
static void AddScaled (const Polynomial &p1, double w1, const Polynomial &p2, Polynomial &q)
 
static Polynomial BSplineComponent (int i)
 
static void BSplineComponentValues (double x, double *values)
 
static void BinomialCoefficients (int bCoefficients[Degree+1])
 

Public Attributes

double coefficients [Degree+1]
 

Detailed Description

template<int Degree>
class Polynomial< Degree >

Definition at line 37 of file Polynomial.h.

Constructor & Destructor Documentation

◆ Polynomial() [1/2]

template<int Degree>
Polynomial< Degree >::Polynomial ( void  )

◆ Polynomial() [2/2]

template<int Degree>
template<int Degree2>
Polynomial< Degree >::Polynomial ( const Polynomial< Degree2 > &  P)

Member Function Documentation

◆ addScaled()

template<int Degree>
Polynomial& Polynomial< Degree >::addScaled ( const Polynomial< Degree > &  p,
double  scale 
)

◆ AddScaled() [1/3]

template<int Degree>
static void Polynomial< Degree >::AddScaled ( const Polynomial< Degree > &  p1,
const Polynomial< Degree > &  p2,
double  w2,
Polynomial< Degree > &  q 
)
static

◆ AddScaled() [2/3]

template<int Degree>
static void Polynomial< Degree >::AddScaled ( const Polynomial< Degree > &  p1,
double  w1,
const Polynomial< Degree > &  p2,
double  w2,
Polynomial< Degree > &  q 
)
static

◆ AddScaled() [3/3]

template<int Degree>
static void Polynomial< Degree >::AddScaled ( const Polynomial< Degree > &  p1,
double  w1,
const Polynomial< Degree > &  p2,
Polynomial< Degree > &  q 
)
static

◆ BinomialCoefficients()

template<int Degree>
static void Polynomial< Degree >::BinomialCoefficients ( int  bCoefficients[Degree+1])
static

◆ BSplineComponent()

template<int Degree>
static Polynomial Polynomial< Degree >::BSplineComponent ( int  i)
static

◆ BSplineComponentValues()

template<int Degree>
static void Polynomial< Degree >::BSplineComponentValues ( double  x,
double *  values 
)
static

◆ derivative()

template<int Degree>
Polynomial<Degree-1> Polynomial< Degree >::derivative ( void  ) const

◆ getSolutions() [1/2]

template<int Degree>
int Polynomial< Degree >::getSolutions ( double  c,
double *  roots,
double  EPS 
) const

◆ getSolutions() [2/2]

template<int Degree>
void Polynomial< Degree >::getSolutions ( double  c,
std::vector< double > &  roots,
double  EPS 
) const

◆ integral() [1/2]

template<int Degree>
double Polynomial< Degree >::integral ( double  tMin,
double  tMax 
) const

◆ integral() [2/2]

template<int Degree>
Polynomial<Degree+1> Polynomial< Degree >::integral ( void  ) const

◆ isZero()

template<int Degree>
int Polynomial< Degree >::isZero ( void  ) const

◆ Negate()

template<int Degree>
static void Polynomial< Degree >::Negate ( const Polynomial< Degree > &  in,
Polynomial< Degree > &  out 
)
static

◆ operator!=()

template<int Degree>
int Polynomial< Degree >::operator!= ( const Polynomial< Degree > &  p) const

◆ operator()()

template<int Degree>
double Polynomial< Degree >::operator() ( double  t) const

◆ operator*() [1/2]

template<int Degree>
template<int Degree2>
Polynomial<Degree+Degree2> Polynomial< Degree >::operator* ( const Polynomial< Degree2 > &  p) const

◆ operator*() [2/2]

template<int Degree>
Polynomial Polynomial< Degree >::operator* ( double  s) const

◆ operator*=()

template<int Degree>
Polynomial& Polynomial< Degree >::operator*= ( double  s)

◆ operator+() [1/2]

template<int Degree>
Polynomial Polynomial< Degree >::operator+ ( const Polynomial< Degree > &  p) const

◆ operator+() [2/2]

template<int Degree>
Polynomial Polynomial< Degree >::operator+ ( double  s) const

◆ operator+=() [1/2]

template<int Degree>
Polynomial& Polynomial< Degree >::operator+= ( const Polynomial< Degree > &  p)

◆ operator+=() [2/2]

template<int Degree>
Polynomial& Polynomial< Degree >::operator+= ( double  s)

◆ operator-() [1/3]

template<int Degree>
Polynomial Polynomial< Degree >::operator- ( const Polynomial< Degree > &  p) const

◆ operator-() [2/3]

template<int Degree>
Polynomial Polynomial< Degree >::operator- ( double  s) const

◆ operator-() [3/3]

template<int Degree>
Polynomial Polynomial< Degree >::operator- ( void  ) const

◆ operator-=() [1/2]

template<int Degree>
Polynomial& Polynomial< Degree >::operator-= ( const Polynomial< Degree > &  p)

◆ operator-=() [2/2]

template<int Degree>
Polynomial& Polynomial< Degree >::operator-= ( double  s)

◆ operator/()

template<int Degree>
Polynomial Polynomial< Degree >::operator/ ( double  s) const

◆ operator/=()

template<int Degree>
Polynomial& Polynomial< Degree >::operator/= ( double  s)

◆ operator=()

template<int Degree>
template<int Degree2>
Polynomial& Polynomial< Degree >::operator= ( const Polynomial< Degree2 > &  p)

◆ operator==()

template<int Degree>
int Polynomial< Degree >::operator== ( const Polynomial< Degree > &  p) const

◆ printnl()

template<int Degree>
void Polynomial< Degree >::printnl ( void  ) const

◆ Scale()

template<int Degree>
static void Polynomial< Degree >::Scale ( const Polynomial< Degree > &  p,
double  w,
Polynomial< Degree > &  q 
)
static

◆ scale()

template<int Degree>
Polynomial Polynomial< Degree >::scale ( double  s) const

◆ setZero()

template<int Degree>
void Polynomial< Degree >::setZero ( void  )

◆ shift()

template<int Degree>
Polynomial Polynomial< Degree >::shift ( double  t) const

◆ Subtract()

template<int Degree>
static void Polynomial< Degree >::Subtract ( const Polynomial< Degree > &  p1,
const Polynomial< Degree > &  p2,
Polynomial< Degree > &  q 
)
static

Member Data Documentation

◆ coefficients

template<int Degree>
double Polynomial< Degree >::coefficients[Degree+1]

Definition at line 40 of file Polynomial.h.


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