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

Constant expression. More...

#include <TermConstant.h>

Inheritance diagram for TermConstant:
Inheritance graph
Collaboration diagram for TermConstant:
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 TermConstantcreate (Problem *problem, const double value) throw (ProblemMismatchException)
 Creates constant.

Protected Member Functions

double eval (const DoubleVector *variableValues, TermValueSet *termValues)
 Evaluates term.
 TermConstant (Problem *problem, const double value)
 Creates constant.
virtual ~TermConstant ()
 Destroys constant.
- 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

Constant expression.

Definition at line 27 of file TermConstant.h.

Constructor & Destructor Documentation

TermConstant::TermConstant ( Problem problem,
const double  value 
)
protected

Creates constant.

Parameters
problemproblem
valuevalue

Definition at line 28 of file TermConstant.cc.

Member Function Documentation

TermConstant * TermConstant::create ( Problem problem,
const double  value 
) throw (ProblemMismatchException)
static

Creates constant.

Parameters
problemproblem
valuevalue
Returns
term

Definition at line 45 of file TermConstant.cc.

Here is the caller graph for this function:

Term * TermConstant::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 52 of file TermConstant.cc.

Here is the call graph for this function:

double TermConstant::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 61 of file TermConstant.cc.

bool TermConstant::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 67 of file TermConstant.cc.

Here is the call graph for this function:

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

Convert term to string.

Returns
string

Reimplemented from Term.

Definition at line 79 of file TermConstant.cc.


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