AMulet 2.0
AIG Multiplier Verification Tool
Monomial Class Reference

#include <monomial.h>

Collaboration diagram for Monomial:

Public Member Functions

 Monomial (mpz_t _c, Term *_t)
 
Termget_term () const
 
Termget_term_copy () const
 
unsigned get_term_size () const
 
unsigned dec_ref ()
 
unsigned get_ref () const
 
Monomialcopy ()
 
void print (FILE *file, bool lm=0) const
 
 ~Monomial ()
 

Public Attributes

mpz_t coeff
 Coefficient. More...
 

Private Attributes

Termterm
 Term*. More...
 
unsigned ref
 reference counter More...
 

Detailed Description

This class is used to represent monomials in a polynomial. A monomial consist of a coefficient and a term.

Constructor & Destructor Documentation

Monomial::Monomial ( mpz_t  _c,
Term _t 
)

Constructor

Parameters
cmpz_t coefficient
tTerm*
Monomial::~Monomial ( )

Destructor

Member Function Documentation

Monomial * Monomial::copy ( )

Copy routine

Returns
Same monomial with increased reference counter
unsigned Monomial::dec_ref ( )
inline

Decreases the reference counter

Returns
the decreases reference counter
unsigned Monomial::get_ref ( ) const
inline

Getter for the reference counter

Returns
member ref
Term* Monomial::get_term ( ) const
inline

Getter for member term

Returns
Term*
Term* Monomial::get_term_copy ( ) const
inline

Getter for member term, calls copy routine of Term

Returns
a copy of Term* term
unsigned Monomial::get_term_size ( ) const
inline

Returns the size fo the term

Returns
unsigned, the size of the term
void Monomial::print ( FILE *  file,
bool  lm = 0 
) const

Printing routine

Parameters
fileOutput file
lmbool indicating whether we print a leading monomial

Member Data Documentation

mpz_t Monomial::coeff

Coefficient.

unsigned Monomial::ref
private

reference counter

Term* Monomial::term
private

Term*.


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