Mathematical expression.
More...
#include <Term.h>
Public Member Functions |
| virtual Term * | differentiate (TermVariable *variable) throw (ProblemMismatchException) |
| | Determines the partial derivative of the term.
|
| 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.
|
| virtual bool | less (const Term *term) const |
| | Compares this term to an other term.
|
| virtual std::string | toString () const |
| | Convert term to string.
|
Static Public Attributes |
|
static const int | INVALID_INDEX = -1 |
Protected Member Functions |
| virtual double | eval (const DoubleVector *variableValues, TermValueSet *termValues) |
| | Evaluates term.
|
| void | setTermIndex (const int termIndex) |
| | Set term index.
|
| | Term (Problem *problem) |
| | Creates a term.
|
|
virtual | ~Term () |
| | Destroys a term.
|
Detailed Description
Mathematical expression.
Definition at line 42 of file Term.h.
Constructor & Destructor Documentation
Creates a term.
- Parameters
-
| problem | problem to which the term is added |
Definition at line 30 of file Term.cc.
Member Function Documentation
| double Term::eval |
( |
const DoubleVector * |
variableValues, |
|
|
TermValueSet * |
termValues |
|
) |
| |
|
protectedvirtual |
| double Term::evaluate |
( |
const DoubleVector * |
variableValues | ) |
|
Evaluates term.
- Parameters
-
| variableValues | values of the variables |
- Returns
- value of the term
Definition at line 57 of file Term.cc.
| double Term::evaluate |
( |
const DoubleVector * |
variableValues, |
|
|
TermValueSet * |
termValues |
|
) |
| |
Evaluates term.
- Parameters
-
| variableValues | values of the variables |
| termValues | values of the terms |
- Returns
Definition at line 72 of file Term.cc.
| Problem * Term::getProblem |
( |
| ) |
const |
|
virtual |
Returns the problem to which the term belongs.
- Returns
- problem
Definition at line 103 of file Term.cc.
| const int Term::getTermIndex |
( |
| ) |
|
Get term index.
- Returns
- term index
Definition at line 120 of file Term.cc.
| bool Term::less |
( |
const Term * |
term | ) |
const |
|
virtual |
| void Term::setTermIndex |
( |
const int |
termIndex | ) |
|
|
protected |
Set term index.
- Parameters
-
Definition at line 128 of file Term.cc.
| std::string Term::toString |
( |
| ) |
const |
|
virtual |
The documentation for this class was generated from the following files: