Frobby  0.9.5
Public Member Functions | Private Attributes | List of all members
LibPolynomialConsumer Class Reference

Records library interface output into a BigPolynomial. More...

#include <LibTest.h>

Inheritance diagram for LibPolynomialConsumer:
Frobby::PolynomialConsumer

Public Member Functions

 LibPolynomialConsumer (const VarNames &names)
 
virtual void polynomialBegin (size_t varCount)
 Called before output of a polynomial. More...
 
virtual void consume (const mpz_t coef, mpz_ptr *exponentVector)
 For output of a term of the polynomial. More...
 
const BigPolynomialgetPolynomial () const
 Returns the recorded polynomial in a canonical form. More...
 
- Public Member Functions inherited from Frobby::PolynomialConsumer
virtual ~PolynomialConsumer ()
 The provided implementation does nothing. More...
 
virtual void polynomialEnd ()
 Called after output of a polynomial. More...
 

Private Attributes

BigPolynomial _polynomial
 

Detailed Description

Records library interface output into a BigPolynomial.

Definition at line 74 of file LibTest.h.

Constructor & Destructor Documentation

◆ LibPolynomialConsumer()

LibPolynomialConsumer::LibPolynomialConsumer ( const VarNames names)

Definition at line 98 of file LibTest.cpp.

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.

Definition at line 106 of file LibTest.cpp.

◆ getPolynomial()

const BigPolynomial & LibPolynomialConsumer::getPolynomial ( ) const

Returns the recorded polynomial in a canonical form.

Definition at line 113 of file LibTest.cpp.

◆ 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.

Definition at line 102 of file LibTest.cpp.

Member Data Documentation

◆ _polynomial

BigPolynomial LibPolynomialConsumer::_polynomial
mutableprivate

Definition at line 85 of file LibTest.h.


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