#include <term.h>
Public Member Functions | |
Term (const Var *_v, Term *_r, uint64_t _hash, Term *_n) | |
const Var * | get_var () const |
int | get_var_level () const |
int | get_var_num () const |
const char * | get_var_name () const |
Term * | get_rest () const |
uint64_t | get_hash () const |
Term * | get_next () const |
void | set_next (Term *t) |
uint64_t | get_ref () const |
uint64_t | inc_ref () |
uint64_t | dec_ref () |
Term * | copy () |
void | print (FILE *file) const |
unsigned | size () const |
int | cmp (const Term *t) const |
bool | contains (const Var *v) const |
Private Attributes | |
const Var * | variable |
head variable More... | |
Term * | rest |
tail in linked list More... | |
uint64_t | ref |
reference counter More... | |
const uint64_t | hash |
hash value More... | |
Term * | next |
hash collision chain link More... | |
This class is used to represent terms in a polynomial. Terms are represented as ordered linked lists of variables.
Constructor
_v | Var* |
_r | Term* |
_hash | uint64_t |
_n | Term* |
int Term::cmp | ( | const Term * | t | ) | const |
Compares this term to term t using the levels of the variables
t | Term* |
bool Term::contains | ( | const Var * | v | ) | const |
Term * Term::copy | ( | ) |
Copy routine
|
inline |
Decreases ref
|
inline |
Getter for member hash
|
inline |
Getter for member next
|
inline |
Getter for member ref
|
inline |
Getter for member rest
|
inline |
Getter for member variable
|
inline |
Getter for level of variable
|
inline |
Getter for name of variable
|
inline |
Getter for num of variable
|
inline |
Increases ref
void Term::print | ( | FILE * | file | ) | const |
Printing routine
file | Output file |
|
inline |
Setter for member term
t | Term* |
unsigned Term::size | ( | ) | const |
Returns the number of variables in a term
|
private |
hash value
|
private |
hash collision chain link
|
private |
reference counter
|
private |
tail in linked list
|
private |
head variable