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

#include <LibTest.h>

Inheritance diagram for LibPolynomialConsumer:
Collaboration diagram for LibPolynomialConsumer:

Public Member Functions

 LibPolynomialConsumer (const VarNames &names)
virtual void polynomialBegin (size_t varCount)
virtual void consume (const mpz_t coef, mpz_ptr *exponentVector)
const BigPolynomial & getPolynomial () const
Public Member Functions inherited from Frobby::PolynomialConsumer
virtual ~PolynomialConsumer ()
virtual void polynomialEnd ()

Detailed Description

Records library interface output into a BigPolynomial.

Member Function Documentation

◆ consume()

void LibPolynomialConsumer::consume ( const mpz_t coefficient,
mpz_ptr * exponentVector )
virtual

For output of a term of the polynomial. coefficient contains the coefficient of the term, and exponentVector is an array containing the exponents of the term.

The parameters coefficient, exponentVector and its entries must not be altered or deallocated, and no reference to them can be retained after the consume method has returned. If the output must be stored, then a copy must be made.

Implements Frobby::PolynomialConsumer.

◆ getPolynomial()

const BigPolynomial & LibPolynomialConsumer::getPolynomial ( ) const

Returns the recorded polynomial in a canonical form.

◆ polynomialBegin()

void LibPolynomialConsumer::polynomialBegin ( size_t varCount)
virtual

Called before output of a polynomial. varCount is the number of variables in the ring within which the output polynomial lies. The provided implementation does nothing.

Reimplemented from Frobby::PolynomialConsumer.


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