Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Expr_NamedUnknown Class Reference

This class describes any variable of an expression.
Assignment is treated directly in this class.

#include <Expr_NamedUnknown.hxx>

Inheritance diagram for Expr_NamedUnknown:
Inheritance graph
[legend]

Public Member Functions

 Expr_NamedUnknown (const TCollection_AsciiString &name)
Standard_Boolean IsAssigned () const
 Tests if an expression is assigned to <me>.

const
Handle_Expr_GeneralExpression & 
AssignedExpression () const
 If exists, returns the assigned expression.
An exception is raised if the expression does not exist.

void Assign (const Handle< Expr_GeneralExpression > &exp)
 Assigns <me> to <exp> expression.
Raises exception if <exp> refers to <me>.

void Deassign ()
 Supresses the assigned expression

Standard_Integer NbSubExpressions () const
 Returns the number of sub-expressions contained
in <me> ( >= 0)

const
Handle_Expr_GeneralExpression & 
SubExpression (const Standard_Integer I) const
 Returns the -th sub-expression of <me>
raises OutOfRange if > NbSubExpressions(me)

Handle_Expr_GeneralExpression Simplified () const
 Returns a GeneralExpression after replacement of
NamedUnknowns by an associated expression and after
values computation.

Handle_Expr_GeneralExpression ShallowSimplified () const
 Returns a GeneralExpression after a simplification
of the arguments of <me>.

Handle_Expr_GeneralExpression Copy () const
 Returns a copy of <me> having the same unknowns and functions.

Standard_Boolean ContainsUnknowns () const
 Tests if <me> contains NamedUnknown.

Standard_Boolean Contains (const Handle< Expr_GeneralExpression > &exp) const
 Tests if <exp> is contained in <me>.

Standard_Boolean IsLinear () const
 Tests if <me> is linear on every NamedUnknown it
contains.

Handle_Expr_GeneralExpression Derivative (const Handle< Expr_NamedUnknown > &X) const
 Returns the derivative on <X> unknown of <me>

void Replace (const Handle< Expr_NamedUnknown > &var, const Handle< Expr_GeneralExpression > &with)
 Replaces all occurences of with <with> in <me>
Raises InvalidOperand if <with> contains <me>.

Standard_Real Evaluate (const Expr_Array1OfNamedUnknown &vars, const TColStd_Array1OfReal &vals) const
 Returns the value of <me> (as a Real) by
replacement of <vars> by <vals>.
Raises NotEvaluable if <me> contains NamedUnknown not
in <vars> or NumericError if result cannot be computed.


Constructor & Destructor Documentation


Member Function Documentation

const Handle_Expr_GeneralExpression& Expr_NamedUnknown::AssignedExpression ( ) const
Handle_Expr_GeneralExpression Expr_NamedUnknown::Copy ( ) const [virtual]
Handle_Expr_GeneralExpression Expr_NamedUnknown::Derivative ( const Handle< Expr_NamedUnknown > &  X) const [virtual]
Handle_Expr_GeneralExpression Expr_NamedUnknown::ShallowSimplified ( ) const [virtual]
Handle_Expr_GeneralExpression Expr_NamedUnknown::Simplified ( ) const [virtual]
const Handle_Expr_GeneralExpression& Expr_NamedUnknown::SubExpression ( const Standard_Integer  I) const [virtual]

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