Frobby  0.9.5
Public Member Functions | List of all members
Frobby::PolynomialConsumer Class Referenceabstract

This class provides a way to get polynomials as output from Frobby one term at a time. More...

#include <frobby.h>

Inheritance diagram for Frobby::PolynomialConsumer:
LibPolynomialConsumer

Public Member Functions

virtual ~PolynomialConsumer ()
 The provided implementation does nothing. More...
 
virtual void polynomialBegin (size_t varCount)
 Called before output of a polynomial. More...
 
virtual void consume (const mpz_t coefficient, mpz_ptr *exponentVector)=0
 For output of a term of the polynomial. More...
 
virtual void polynomialEnd ()
 Called after output of a polynomial. More...
 

Detailed Description

This class provides a way to get polynomials as output from Frobby one term at a time.

Many computations performed by Frobby can produce output continously instead of having to wait for the computation to be done to be able to produce any output. Often the output can be processed, such as writing it to disk, as it is produced, and in these cases there is no reason to store all of the output before processing any of it. Often just storing the output can consume many times the amount of memory Frobby otherwise needs to carry out the computation.

Definition at line 114 of file frobby.h.

Constructor & Destructor Documentation

◆ ~PolynomialConsumer()

Frobby::PolynomialConsumer::~PolynomialConsumer ( )
virtual

The provided implementation does nothing.

Definition at line 166 of file frobby.cpp.

Member Function Documentation

◆ consume()

virtual void Frobby::PolynomialConsumer::consume ( const mpz_t  coefficient,
mpz_ptr *  exponentVector 
)
pure 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.

Implemented in LibPolynomialConsumer.

◆ polynomialBegin()

void Frobby::PolynomialConsumer::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 in LibPolynomialConsumer.

Definition at line 169 of file frobby.cpp.

◆ polynomialEnd()

void Frobby::PolynomialConsumer::polynomialEnd ( )
virtual

Called after output of a polynomial.

The provided implementation does nothing.

Definition at line 172 of file frobby.cpp.


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