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

Product of two terms. More...

#include <TermProduct.h>

Inheritance diagram for TermProduct:
Inheritance graph
Collaboration diagram for TermProduct:
Collaboration graph

Public Member Functions

Termdifferentiate (TermVariable *variable) throw (ProblemMismatchException)
 Determines the partial derivative of the term.
bool less (const Term *term) const
 Compares this term to an other term.
std::string toString () const
 Convert term to string.

Static Public Member Functions

static Termcreate (Problem *problem, Term *factor1, Term *factor2)
 Creates a product term.

Protected Member Functions

double eval (const DoubleVector *variableValues, TermValueSet *termValues)
 Evaluates term.
 TermProduct (Problem *problem, Term *factor1, Term *factor2)
 Creates product.
virtual ~TermProduct ()
 Destroys product.
- Protected Member Functions inherited from TermBinary
 TermBinary (Problem *problem)
 Creates a binary term.
virtual ~TermBinary ()
 Destroys a binary 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

Product of two terms.

Definition at line 27 of file TermProduct.h.

Constructor & Destructor Documentation

TermProduct::TermProduct ( Problem problem,
Term factor1,
Term factor2 
)
protected

Creates product.

Parameters
problemproblem to which the term belongs
factor1first factor
factor2second factor

Definition at line 33 of file TermProduct.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

Term * TermProduct::create ( Problem problem,
Term factor1,
Term factor2 
)
static

Creates a product term.

Parameters
problemproblem to which the term belongs
factor1first factor
factor2second factor
Returns
product

Definition at line 58 of file TermProduct.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Term * TermProduct::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 91 of file TermProduct.cc.

Here is the call graph for this function:

double TermProduct::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 108 of file TermProduct.cc.

Here is the call graph for this function:

bool TermProduct::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 114 of file TermProduct.cc.

Here is the call graph for this function:

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

Convert term to string.

Returns
string

Reimplemented from Term.

Definition at line 134 of file TermProduct.cc.


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