#include <Polynomial_LD.h>
A generic polynomial with N variables of type Real. A polynomial is a list composed of several monomials. More...
A generic polynomial with N variables of type Real. A polynomial is a list composed of several monomials.
Public Attributes | |
| unsigned int | nbOfMonomial |
| MonomialsList | listOfMonoMial |
Public Member Functions | |
| Polynomial_LD () | |
| Default constructor. More... | |
| Polynomial_LD (const Polynomial_LD< Real, N > &a) | |
| Copy constructor. More... | |
| Polynomial_LD (const Monomial_LD< Real, N > &a) | |
| Polynomial_LD< Real, N > & | operator= (const Polynomial_LD< Real, N > &b) |
| Assign operator. More... | |
| Polynomial_LD (const unsigned int nbofTerm,...) | |
| setting of Polynomial More... | |
| void | Set (const unsigned int nbofTerm,...) |
| int | degree () |
| bool | operator== (const Polynomial_LD< Real, N > &b) const |
| Return true if a and b has the same powers. More... | |
| bool | operator!= (const Polynomial_LD< Real, N > &b) const |
| Polynomial_LD< Real, N > & | operator*= (const Real &alpha) |
| Polynomial_LD< Real, N > & | operator/= (const Real &alpha) |
| Polynomial_LD< Real, N > & | operator+= (const Monomial_LD< Real, N > &b) |
| Polynomial_LD< Real, N > & | operator+= (const Polynomial_LD< Real, N > &b) |
| Polynomial_LD< Real, N > & | operator-= (const Polynomial_LD< Real, N > &b) |
| Polynomial_LD< Real, N > | operator+ () const |
| Polynomial_LD< Real, N > | operator- () const |
| Polynomial_LD< Real, N > & | operator*= (const Polynomial_LD< Real, N > &b) |
| Polynomial_LD< Real, N > | operator* (const Real &alpha) |
| Polynomial_LD< Real, N > | operator/ (const Real &alpha) |
| Polynomial_LD< Real, N > | operator+ (const Monomial_LD< Real, N > &a) |
| Polynomial_LD< Real, N > | operator+ (const Polynomial_LD< Real, N > &a) |
| Polynomial_LD< Real, N > | operator- (const Polynomial_LD< Real, N > &a) |
| Polynomial_LD< Real, N > | operator* (const Polynomial_LD< Real, N > &a) |
| Real | operator() (const RNpoint &x) const |
| Evaluating. More... | |
| Real | operator() (const RNpoint &x, unsigned int idvar) const |
| Evaluating first partial derivative by idvar-th variable. More... | |
| Polynomial_LD< Real, N > | d (const unsigned int &ideriv) const |
| Evaluating partial derivative hight order by idvar-th variable in ideriv-th order. More... | |
| void | setnbOfMonomial (int m_nbofmonomial) |
| void | writeToStream (std::ostream &stream) const |
| void | readFromStream (std::istream &stream) |
| std::string | getString () const |
| void | sort () |
Protected Member Functions | |
| void | exchangeMonomial (unsigned int ithMono, unsigned int jthMono) |
| The sort must be done after each constructor and each operation where monomials are inserted. More... | |
| void | sortByVar (unsigned int idVar) |
Friends | |
| template<typename FReal , unsigned int FN> | |
| Polynomial_LD< FReal, FN > & | operator* (const FReal &alpha, Polynomial_LD< FReal, FN > &r) |
| template<typename FReal , unsigned int FN> | |
| Polynomial_LD< FReal, FN > & | operator* (const Monomial_LD< FReal, FN > &a, Polynomial_LD< FReal, FN > &r) |
| poly=poly+mono || mono + poly More... | |
| MonomialsList sofa::helper::Polynomial_LD< Real, N >::listOfMonoMial |
| unsigned int sofa::helper::Polynomial_LD< Real, N >::nbOfMonomial |
| sofa::helper::Polynomial_LD< Real, N >::Polynomial_LD |
Default constructor.
| sofa::helper::Polynomial_LD< Real, N >::Polynomial_LD | ( | const Polynomial_LD< Real, N > & | a | ) |
Copy constructor.
| sofa::helper::Polynomial_LD< Real, N >::Polynomial_LD | ( | const Monomial_LD< Real, N > & | a | ) |
| sofa::helper::Polynomial_LD< Real, N >::Polynomial_LD | ( | const unsigned int | nbofTerm, |
| ... | |||
| ) |
setting of Polynomial
| Polynomial_LD< Real, N > sofa::helper::Polynomial_LD< Real, N >::d | ( | const unsigned int & | ideriv | ) | const |
Evaluating partial derivative hight order by idvar-th variable in ideriv-th order.
Derivative operator allowing to write p1=p2.d(x);
| int sofa::helper::Polynomial_LD< Real, N >::degree |
|
protected |
The sort must be done after each constructor and each operation where monomials are inserted.
| std::string sofa::helper::Polynomial_LD< Real, N >::getString |
|
inline |
| Real sofa::helper::Polynomial_LD< Real, N >::operator() | ( | const RNpoint & | x | ) | const |
Evaluating.
| Real sofa::helper::Polynomial_LD< Real, N >::operator() | ( | const RNpoint & | x, |
| unsigned int | idvar | ||
| ) | const |
Evaluating first partial derivative by idvar-th variable.
|
inline |
|
inline |
| Polynomial_LD< Real, N > & sofa::helper::Polynomial_LD< Real, N >::operator*= | ( | const Polynomial_LD< Real, N > & | b | ) |
| Polynomial_LD< Real, N > & sofa::helper::Polynomial_LD< Real, N >::operator*= | ( | const Real & | alpha | ) |
|
inline |
|
inline |
|
inline |
| Polynomial_LD< Real, N > & sofa::helper::Polynomial_LD< Real, N >::operator+= | ( | const Monomial_LD< Real, N > & | b | ) |
| Polynomial_LD< Real, N > & sofa::helper::Polynomial_LD< Real, N >::operator+= | ( | const Polynomial_LD< Real, N > & | b | ) |
| Polynomial_LD< Real, N > sofa::helper::Polynomial_LD< Real, N >::operator- |
|
inline |
| Polynomial_LD< Real, N > & sofa::helper::Polynomial_LD< Real, N >::operator-= | ( | const Polynomial_LD< Real, N > & | b | ) |
|
inline |
| Polynomial_LD< Real, N > & sofa::helper::Polynomial_LD< Real, N >::operator/= | ( | const Real & | alpha | ) |
|
inline |
Assign operator.
| bool sofa::helper::Polynomial_LD< Real, N >::operator== | ( | const Polynomial_LD< Real, N > & | b | ) | const |
Return true if a and b has the same powers.
| void sofa::helper::Polynomial_LD< Real, N >::readFromStream | ( | std::istream & | stream | ) |
| void sofa::helper::Polynomial_LD< Real, N >::Set | ( | const unsigned int | nbofTerm, |
| ... | |||
| ) |
| void sofa::helper::Polynomial_LD< Real, N >::setnbOfMonomial | ( | int | m_nbofmonomial | ) |
| void sofa::helper::Polynomial_LD< Real, N >::sort |
|
protected |
| void sofa::helper::Polynomial_LD< Real, N >::writeToStream | ( | std::ostream & | stream | ) | const |
|
friend |
Comutativity of operator*(Real): Allowing to write p1=r*p2; or p1=p2*r; Polynomial_LD = Polynomial_LD*Real || Real*Polynomial_LD.
|
friend |
poly=poly+mono || mono + poly