Class xlifepp::PolynomialT#

template<typename K = real_t>
class PolynomialT#

Collaboration diagram for xlifepp::PolynomialT:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "4" [label="xlifepp::PolyNodeT< real_t >" tooltip="xlifepp::PolyNodeT< real_t >"] "2" [label="std::list< std::pair< xlifepp::MonomialT< real_t >, real_t > >" tooltip="std::list< std::pair< xlifepp::MonomialT< real_t >, real_t > >"] "3" [label="std::list< T >" tooltip="std::list< T >"] "5" [label="xlifepp::PolyNodeT< K >" tooltip="xlifepp::PolyNodeT< K >"] "1" [label="xlifepp::PolynomialT< K >" tooltip="xlifepp::PolynomialT< K >" fillcolor="#BFBFBF"] "4" -> "4" [dir=forward tooltip="usage"] "4" -> "5" [dir=forward tooltip="template-instance"] "2" -> "3" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "4" [dir=forward tooltip="usage"] }

deals with a Polynomial, say a linear combination of Monomials

Public Functions

string_t asString() const#

string form of polynomial

void buildTree() const#

build tree representation of polynomial

inline void clean()#

remove Monomials with coefficients < epsilon defined in Polynomials

inline void clean(real_t asZero)#

remove Monomials with coefficients < asZero

inline K eval(const K &x1, const K &x2 = K(1), const K &x3 = K(1)) const#

eval polynomial at x1,x2,x3

inline bool isZero() const#

< true if 0 polynomial

PolynomialT<K> operator()(const PolynomialT<K> &px, const PolynomialT<K> &py = PolynomialT<K>(), const PolynomialT<K> &pz = PolynomialT<K>()) const#

eval polynomial with other polynomials

inline PolynomialT<K> &operator*=(const MonomialT<K> &m)#

replace one variable by a polynomial

product by a Monomial

PolynomialT<K> &replace(VariableName, const PolynomialT<K>&)#

replace variable by Polynomial

void swapVar(dimen_t v1, dimen_t v2, dimen_t v3)#

swap variables x1->xv1, x2->xv2, x3->xv3

Public Members

real_t epsilon#

value used to round coefficients to zero

std::list<std::pair<MonomialT<K>, K>> monomials#

list of monomials and their coefficients

mutable PolyNodeT<K> tree#

tree representation