Crevice  0.1
 All Classes Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
TermAbs Class Reference

Absolute value of a term. More...

#include <TermAbs.h>

Inheritance diagram for TermAbs:
Inheritance graph
Collaboration diagram for TermAbs:
Collaboration graph

Public Member Functions

Termdifferentiate (TermVariable *variable) throw (ProblemMismatchException)
 Determines the partial derivative of the term.
double evaluate ()
bool less (const Term *term) const
 Compares this term to an other term.
std::string toString () const
 Convert term to string.
- Public Member Functions inherited from Term
double evaluate (const DoubleVector *variableValues)
 Evaluates term.
double evaluate (const DoubleVector *variableValues, TermValueSet *termValues)
 Evaluates term.
virtual ProblemgetProblem () const
 Returns the problem to which the term belongs.
const int getTermIndex ()
 Get term index.

Static Public Member Functions

static TermAbscreate (Problem *problem, Term *term) throw (ProblemMismatchException)
 Creates term.

Protected Member Functions

double eval (const DoubleVector *variableValues, TermValueSet *termValues)
 Evaluates term.
 TermAbs (Problem *problem, Term *term)
 Creates absolute value term.
virtual ~TermAbs ()
 Destroys term.
- Protected Member Functions inherited from Term
void setTermIndex (const int termIndex)
 Set term index.
 Term (Problem *problem)
 Creates a term.
virtual ~Term ()
 Destroys a term.

Additional Inherited Members

- Static Public Attributes inherited from Term
static const int INVALID_INDEX = -1

Detailed Description

Absolute value of a term.

Definition at line 28 of file TermAbs.h.

Constructor & Destructor Documentation

TermAbs::TermAbs ( Problem problem,
Term term 
)
protected

Creates absolute value term.

Parameters
problemproblem
valuevalue

Definition at line 32 of file TermAbs.cc.

Member Function Documentation

TermAbs * TermAbs::create ( Problem problem,
Term term 
) throw (ProblemMismatchException)
static

Creates term.

Parameters
problemproblem
valuevalue
Returns
term

Definition at line 49 of file TermAbs.cc.

Term * TermAbs::differentiate ( TermVariable variable) throw (ProblemMismatchException)
virtual

Determines the partial derivative of the term.

Parameters
variablevariable with respect to which the derivative shall be calculated
Returns
partial derivative

Reimplemented from Term.

Definition at line 56 of file TermAbs.cc.

Here is the call graph for this function:

double TermAbs::eval ( const DoubleVector *  variableValues,
TermValueSet *  termValues 
)
protectedvirtual

Evaluates term.

Parameters
variableValuesvalues of the variables
termValuesvalues of the terms
Returns

Reimplemented from Term.

Definition at line 64 of file TermAbs.cc.

Here is the call graph for this function:

bool TermAbs::less ( const Term term) const
virtual

Compares this term to an other term.

Parameters
termterm to compare this term with
Returns
true if this term is before the other term

Reimplemented from Term.

Definition at line 71 of file TermAbs.cc.

Here is the call graph for this function:

std::string TermAbs::toString ( ) const
virtual

Convert term to string.

Returns
string

Reimplemented from Term.

Definition at line 83 of file TermAbs.cc.

Here is the call graph for this function:


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