MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::SparsePolynomial< C, D, M > Class Template Reference

#include <MRSparsePolynomial.h>

Public Member Functions

 SparsePolynomial ()=default
 constructs zero polynomial
 
 SparsePolynomial (std::map< D, C > &&)
 takes existing coefficients in ownership
 
 SparsePolynomial (C c0, D d1, C c1)
 constructs polynomial c0 + c1*x^d1
 
 SparsePolynomial (C c0, D d1, C c1, D d2, C c2)
 constructs polynomial c0 + c1*x^d1 + c2*x^d2
 
void setZeroCoeff (D d)
 sets coefficient for given degree to zero
 
bool empty () const
 returns true if no single polynomial coefficient is defined
 
bool isPositive () const
 returns true if the coefficient for the smallest not-zero degress is positive
 
const std::map< D, C > & get () const
 gets read-only access to all not-zero coefficients
 
SparsePolynomialoperator+= (const SparsePolynomial &b)
 
SparsePolynomialoperator-= (const SparsePolynomial &b)
 

Friends

SparsePolynomial operator* (const SparsePolynomial &a, const SparsePolynomial &b)
 

Detailed Description

template<typename C, typename D, D M>
class MR::SparsePolynomial< C, D, M >

The class to store a polynomial with a large number of zero coefficient (only non-zeros are stored in std::map)

Template Parameters
C- type of coefficients
D- type of degrees
M- maximum degree to store in the polynomial

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