Constant expression.
More...
#include <TermConstant.h>
Public Member Functions |
| Term * | differentiate (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.
|
| double | evaluate (const DoubleVector *variableValues) |
| | Evaluates term.
|
| double | evaluate (const DoubleVector *variableValues, TermValueSet *termValues) |
| | Evaluates term.
|
| virtual Problem * | getProblem () const |
| | Returns the problem to which the term belongs.
|
| const int | getTermIndex () |
| | Get term index.
|
Static Public Member Functions |
| static TermConstant * | create (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.
|
| void | setTermIndex (const int termIndex) |
| | Set term index.
|
| | Term (Problem *problem) |
| | Creates a term.
|
|
virtual | ~Term () |
| | Destroys a term.
|
Additional Inherited Members |
|
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
-
| problem | problem |
| value | value |
Definition at line 28 of file TermConstant.cc.
Member Function Documentation
Creates constant.
- Parameters
-
| problem | problem |
| value | value |
- Returns
- term
Definition at line 45 of file TermConstant.cc.
Determines the partial derivative of the term.
- Parameters
-
| variable | variable with respect to which the derivative shall be calculated |
- Returns
- partial derivative
Reimplemented from Term.
Definition at line 52 of file TermConstant.cc.
| double TermConstant::eval |
( |
const DoubleVector * |
variableValues, |
|
|
TermValueSet * |
termValues |
|
) |
| |
|
protectedvirtual |
Evaluates term.
- Parameters
-
| variableValues | values of the variables |
| termValues | values 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
-
| term | term 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.
| 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: