|
Public Member Functions |
| Expression () |
| Expression (Real constant) |
| Expression (const Expression &e) |
| Expression (const String &exprString) |
| construct from string - e.g. '2.3*cos(p[0])+p[2]/(4*p[1])'
|
virtual String | className () const |
Real | evaluate (const Vector ¶ms) const |
Expression | differentiate (Expression withRespectTo) const |
void | simplify () |
| simplify the expression (constant sub-expression evaluation, common sub-expression elimination etc.)
|
void | operationCounts (Int &addsub, Int &multdiv, Int &trig) const |
| calculate operation counts for evaluating the expression (added to args)
|
String | toString () const |
Expression & | operator= (const Expression &e) |
Expression & | operator+= (const Expression &e) |
Expression & | operator-= (const Expression &e) |
Expression & | operator *= (const Expression &e) |
Expression & | operator/= (const Expression &e) |
Expression & | negate () |
Expression & | sin () |
Expression & | cos () |
virtual void | serialize (Serializer &s) |
| read or write object state to Serializer
|
virtual bool | isSameKindAs (const Object &) const |
Static Public Member Functions |
template<class BaseClass, class DerivedClass> void | registerSerializableInstantiator (const SerializableInstantiator &instantiator) |
void | registerSerializableInstantiator (const String &baseClassTypeName, const String &derivedClassTypeName, const SerializableInstantiator &instantiator) |
template<class BaseClass> const SerializableInstantiator & | getSerializableInstantiator (const String &derivedClassTypeName) |
const SerializableInstantiator & | getSerializableInstantiator (const String &baseClassTypeName, const String &derivedClassTypeName) |
Static Public Attributes |
VariableIndexer | p |
| p[i] is an Expression that evaluates to the variable params[i]
|
Protected Member Functions |
| Expression (ref< ExpressionNode > expr) |
ref< ExpressionNode > | simplifyConstantExpressions (ref< ExpressionNode > expr) |
| evaluate and replace constant expression subtrees with a single ConstantExpression
|
Static Protected Member Functions |
bool | peek (const String &s, Int pos, String next) |
bool | peek (const String &s, Int pos, String::value_type c) |
SInt | index (const String &s, Int &pos) |
Real | real (const String &s, Int &pos) |
Expression | expression (const String &s, Int &pos) |
Expression | term (const String &s, Int &pos) |
Expression | prod (const String &s, Int &pos) |
Protected Attributes |
ref< ExpressionNode > | expr |
| root of ExpressionNode tree
|
Serializable::SerializableDerivedInstantiator<
SumExpression > | sumInstantiator |
Serializable::SerializableDerivedInstantiator<
DifferenceExpression > | differenceInstantiator |
Serializable::SerializableDerivedInstantiator<
ProductExpression > | productInstantiator |
Serializable::SerializableDerivedInstantiator<
QuotientExpression > | quotientInstantiator |
Serializable::SerializableDerivedInstantiator<
NegateExpression > | negateInstantiator |
Serializable::SerializableDerivedInstantiator<
SinExpression > | sinInstantiator |
Serializable::SerializableDerivedInstantiator<
CosExpression > | cosInstantiator |
Serializable::SerializableDerivedInstantiator<
ConstantExpression > | constantInstantiator |
Serializable::SerializableDerivedInstantiator<
VariableExpression > | variableInstantiator |
Friends |
class | VariableIndexer |
void | base::setIdentity (ExpressionMatrix &A) |