Frobby  0.9.5
Functions
TermPredicate.cpp File Reference
#include "stdinc.h"
#include "TermPredicate.h"
#include "NameFactory.h"

Go to the source code of this file.

Functions

auto_ptr< TermPredicatecreateTermPredicate (const string &prefix, size_t varCount)
 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 
)

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.