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

Describes any numeric constant known by a special name
(as PI, e,...).

#include <Expr_NamedConstant.hxx>

Inheritance diagram for Expr_NamedConstant:
Inheritance graph
[legend]

Public Member Functions

 Expr_NamedConstant (const TCollection_AsciiString &name, const Standard_Real value)
 Creates a constant value of name <name> and value .

Standard_Real GetValue () const
Standard_Integer NbSubExpressions () const
 returns the number of sub-expressions contained
in <me> (always returns zero)

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

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.
(returns always False)

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>

virtual
Handle_Expr_GeneralExpression 
NDerivative (const Handle< Expr_NamedUnknown > &X, const Standard_Integer N) const
 Returns the <N>-th derivative on <X> unknown of <me>.
Raises OutOfRange if <N> <= 0

void Replace (const Handle< Expr_NamedUnknown > &var, const Handle< Expr_GeneralExpression > &with)
 Replaces all occurences of with <with> in <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>.


Constructor & Destructor Documentation


Member Function Documentation

Handle_Expr_GeneralExpression Expr_NamedConstant::Copy ( ) const [virtual]
Handle_Expr_GeneralExpression Expr_NamedConstant::Derivative ( const Handle< Expr_NamedUnknown > &  X) const [virtual]
virtual Handle_Expr_GeneralExpression Expr_NamedConstant::NDerivative ( const Handle< Expr_NamedUnknown > &  X,
const Standard_Integer  N 
) const [virtual]

Reimplemented from Expr_GeneralExpression.

Handle_Expr_GeneralExpression Expr_NamedConstant::ShallowSimplified ( ) const [virtual]
Handle_Expr_GeneralExpression Expr_NamedConstant::Simplified ( ) const [virtual]
const Handle_Expr_GeneralExpression& Expr_NamedConstant::SubExpression ( const Standard_Integer  I) const [virtual]

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