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

Variable. More...

#include <TermVariable.h>

Inheritance diagram for TermVariable:
Inheritance graph
Collaboration diagram for TermVariable:
Collaboration graph

Public Member Functions

Termdifferentiate (TermVariable *variable) throw (ProblemMismatchException)
 Diffentiates this term by variable.
bool less (const Term *term) const
 Compares this variable with a term.
const double getLowerBound ()
 Gets lower bound.
void setLowerBound (const double lowerBound)
 Sets lower bound.
const int getVariableIndex ()
 Gets index of variable.
const std::string getName ()
 Gets name of this variable.
const double getUpperBound ()
 Gets upper bound.
void setUpperBound (const double upperBound)
 Sets upper bound.
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 TermVariablecreate (Problem *problem, const std::string &name)
 Creates variable.

Protected Member Functions

double eval (const DoubleVector *variableValues, TermValueSet *termValues)
 Evaluates term.
void setVariableIndex (const int variableIndex)
 Sets index of variable.
 TermVariable (Problem *problem, const std::string &name)
 Creates variable.
virtual ~TermVariable ()
 Destroys variable.
- 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.

Friends

class Problem

Additional Inherited Members

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

Detailed Description

Variable.

Definition at line 32 of file TermVariable.h.

Constructor & Destructor Documentation

TermVariable::TermVariable ( Problem problem,
const std::string &  name 
)
protected

Creates variable.

Parameters
problemproblem
namename of variable

Definition at line 29 of file TermVariable.cc.

Here is the caller graph for this function:

Member Function Documentation

TermVariable * TermVariable::create ( Problem problem,
const std::string &  name 
)
static

Creates variable.

Parameters
problemproblem
namename of variable
Returns

Definition at line 67 of file TermVariable.cc.

Here is the call graph for this function:

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

Diffentiates this term by variable.

Parameters
variablevariable
Returns
derivative

Reimplemented from Term.

Definition at line 78 of file TermVariable.cc.

Here is the call graph for this function:

double TermVariable::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 91 of file TermVariable.cc.

const double TermVariable::getLowerBound ( )

Gets lower bound.

Returns
lower bound

Definition at line 117 of file TermVariable.cc.

const std::string TermVariable::getName ( )

Gets name of this variable.

Returns
name

Definition at line 133 of file TermVariable.cc.

const double TermVariable::getUpperBound ( )

Gets upper bound.

Returns
upper bound

Definition at line 141 of file TermVariable.cc.

const int TermVariable::getVariableIndex ( )

Gets index of variable.

Returns

Definition at line 101 of file TermVariable.cc.

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

Compares this variable with a term.

Parameters
termterm
Returns
this variable is before term.

Reimplemented from Term.

Definition at line 47 of file TermVariable.cc.

Here is the call graph for this function:

void TermVariable::setLowerBound ( const double  lowerBound)

Sets lower bound.

Parameters
lowerBoundlower bound

Definition at line 125 of file TermVariable.cc.

void TermVariable::setUpperBound ( const double  upperBound)

Sets upper bound.

Parameters
upperBoundupper bound

Definition at line 149 of file TermVariable.cc.

void TermVariable::setVariableIndex ( const int  variableIndex)
protected

Sets index of variable.

Parameters
index

Definition at line 109 of file TermVariable.cc.

Here is the caller graph for this function:

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

Convert term to string.

Returns
string

Reimplemented from Term.

Definition at line 153 of file TermVariable.cc.


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