Frobby 0.10.0
Loading...
Searching...
No Matches
HashPolynomial Class Reference

#include <HashPolynomial.h>

Public Member Functions

 HashPolynomial (size_t varCount=0)
void clearAndSetVarCount (size_t varCount)
void add (const mpz_class &coef, const Term &term)
void add (bool plus, const Term &term)
void feedTo (const TermTranslator &translator, CoefBigTermConsumer &consumer, bool inCanonicalOrder) const
size_t getTermCount () const

Detailed Description

A sparse multivariate polynomial represented by a hash table mapping terms to coefficients. This allows to avoid duplicate terms without a large overhead.

Member Function Documentation

◆ add() [1/2]

void HashPolynomial::add ( bool plus,
const Term & term )

Add +term or -term to the polynomial depending on whether plus is true or false, respectively.

◆ add() [2/2]

void HashPolynomial::add ( const mpz_class & coef,
const Term & term )

Add coef*term to the polynomial.


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