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

#include <UniHashPolynomial.h>

Public Member Functions

void add (bool plus, const mpz_class &exponent)
void add (int coef, size_t exponent)
void add (const mpz_class &coef, const mpz_class &exponent)
void feedTo (CoefBigTermConsumer &consumer, bool inCanonicalOrder=false) const
size_t getTermCount () const

Detailed Description

A sparse univariate 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/3]

void UniHashPolynomial::add ( bool plus,
const mpz_class & exponent )

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

◆ add() [2/3]

void UniHashPolynomial::add ( const mpz_class & coef,
const mpz_class & exponent )

Add coef*t^exponent to the polynomial.

◆ add() [3/3]

void UniHashPolynomial::add ( int coef,
size_t exponent )

Add coef*t^exponent to the polynomial.


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