Frobby  0.9.5
Classes | Functions
TermPredicate.h File Reference
#include "Term.h"

Go to the source code of this file.

Classes

class  TermPredicate
 
class  StlTermPredicate
 Adapter for TermPredicate which allows it to be used as a predicate in STL. More...
 
class  LexComparator
 A predicate that sorts terms according to lexicographic order. More...
 
class  ReverseLexComparator
 A predicate that sorts according to reverse lexicographic order. More...
 
class  SingleDegreeComparator
 A predicate that sorts terms in weakly ascending order according to degree of the specified variable. More...
 
class  ReverseSingleDegreeComparator
 A predicate that sorts terms in weakly descending order according to degree of the specified variable. More...
 
class  EqualsPredicate
 A predicate that compares for equality. More...
 

Functions

auto_ptr< TermPredicatecreateTermPredicate (const string &prefix, size_t varCount=0)
 Returns the predicate whose name has the given prefix. More...
 
int lexCompare (const Exponent *a, const Exponent *b, size_t varCount)
 Indicates how a relates to b according to the lexicographic term order where $x_1>\cdots>x_n$. More...
 
int lexCompare (const Term &a, const Term &b)
 
int reverseLexCompare (const Exponent *a, const Exponent *b, size_t varCount)
 Indicates how a relates to b according to the reverse lexicographic term order where $x_1<\cdots<x_n$. More...
 
bool equals (const Exponent *a, const Exponent *b, size_t varCount)
 Returns whether the entries of a are equal to the entries of b. More...
 

Function Documentation

◆ createTermPredicate()

auto_ptr<TermPredicate> createTermPredicate ( const string &  prefix,
size_t  varCount = 0 
)

Returns the predicate whose name has the given prefix.

Definition at line 43 of file TermPredicate.cpp.

◆ equals()

bool equals ( const Exponent a,
const Exponent b,
size_t  varCount 
)

Returns whether the entries of a are equal to the entries of b.

Definition at line 77 of file TermPredicate.cpp.

◆ lexCompare() [1/2]

int lexCompare ( const Exponent a,
const Exponent b,
size_t  varCount 
)

Indicates how a relates to b according to the lexicographic term order where $x_1>\cdots>x_n$.

Returns -1 if a < b, returns 0 if a = b and returns 1 if a > b. As an example $x^(0,0) < x^(0,1) < x^(1,0)$.

Definition at line 50 of file TermPredicate.cpp.

◆ lexCompare() [2/2]

int lexCompare ( const Term a,
const Term b 
)

Definition at line 66 of file TermPredicate.cpp.

◆ reverseLexCompare()

int reverseLexCompare ( const Exponent a,
const Exponent b,
size_t  varCount 
)

Indicates how a relates to b according to the reverse lexicographic term order where $x_1<\cdots<x_n$.

Returns -1 if a < b, returns 0 if a = b and returns 1 if a > b. As an example $x^(0,0) < x^(1,0) < x^(0,1)$.

Definition at line 71 of file TermPredicate.cpp.