|
C3D Toolkit
Kernel - 118060, Vision - 2.15.0.1825
|
Base class for nodes of the expression tree. More...
#include <pars_equation_tree.h>
Inheritance diagram for BTreeNode:
Collaboration diagram for BTreeNode:Public Types | |
| typedef std::map< ItTreeVariable *, ItTreeVariable * > | EqualVarsMap |
| A set of pairs of variables. | |
| typedef std::map< const ItCoord *, DerivesValues > | VarsDerives |
| A set of pairs: coordinate - value and derivatives. | |
Public Member Functions | |
| virtual BteNodeType | IsA () const =0 |
| Get type of a tree node. | |
| virtual BTreeNode * | Duplicate () const =0 |
| Create a copy of the object. | |
| virtual bool | IsLine () const =0 |
| Function is linear. | |
Functions for calculation of the value and the derivative. | |
| virtual EquTreeResCode | GetValue (double &fValue) const =0 |
| Calculate value. More... | |
| virtual bool | SetValue (double v, const std::set< ItTreeVariable * > &unfixedDVars)=0 |
| Set value. More... | |
| virtual EquTreeResCode | GetStringValue (c3d::string_t &varName) const |
| Calculate string value. More... | |
| virtual EquTreeResCode | CalculateDerives (double &fValue, double &derive1, double &derive2, double &derive3, const VarsDerives &ders) const =0 |
| Calculate a value and derivatives. More... | |
| EquTreeResCode | CalculateDerives (const ItCoord *coord, double &v, double &fd, double &sd, double &td) const |
| Calculate a value and derivatives. More... | |
| virtual void | GetUsedVariables (SSArray< ItTreeVariable * > &arr, SSArray< ItUserFunc * > &funcs) const =0 |
| Get the used variables. More... | |
Functions for replacing variables by names. | |
| virtual void | ReplaceParVariable (const c3d::string_t &varName, ItTreeVariable &newVar)=0 |
| Replace variables. More... | |
| virtual void | ReplaceParVariable (const ItTreeVariable &var, const BTreeNode &subTree)=0 |
| Replace a node. More... | |
| virtual void | ReplaceIntVariable (const c3d::string_t &, ItIntervalTreeVariable &) |
| Replace variables. More... | |
Functions for access to data. | |
| bool | GetExtremumPoints (const c3d::DoublePair &interval, ItTreeVariable &var, c3d::DoubleVector &points) |
| Get value of parameter of extremum. More... | |
| virtual bool | GetDefRange (DefRange &defRange, ItTreeVariable &var, bool stopOnBreak) const =0 |
| Domain. More... | |
| virtual size_t | GetPseudoOrderByVar (ItTreeVariable &var) const =0 |
| For internal use only! Order of variable. More... | |
| virtual BTreeNodeSPtr | FixVars (const RPArray< ItTreeVariable > &unfixedVars, IFC_Array< ItUserFunc > &newFuncs, EquTreeResCode &code) const =0 |
| Fixed variables. More... | |
| virtual BTreeNodeSPtr | GetCalcEquivalent () const =0 |
| Get equivalent node. | |
| virtual void | GetString (c3d::string_t &) const =0 |
| Get string. More... | |
| virtual size_t | SizeOf () const =0 |
| Get size in bytes. | |
Comparison function. | |
| virtual bool | IsEqual (const BTreeNode &other, const EqualVarsMap &varsMap) const =0 |
| Whether the node is equal to the given node. More... | |
| virtual bool | IsEqual (const BTreeConst &, const EqualVarsMap &) const |
| Whether the node is equal to the given node. More... | |
| virtual bool | IsEqual (const BTreeIdent &, const EqualVarsMap &) const |
| Whether the node is equal to the given node. More... | |
| virtual bool | IsEqual (const BTreeFunction &, const EqualVarsMap &) const |
| Whether the node is equal to the given node. More... | |
| virtual bool | IsEqual (const BTreeOperation &, const EqualVarsMap &) const |
| Whether the node is equal to the given node. More... | |
| virtual bool | IsEqual (const BTreeOperation1Arg &, const EqualVarsMap &) const |
| Whether the node is equal to the given node. More... | |
| virtual bool | IsEqual (const BTreeOperation3Args &, const EqualVarsMap &) const |
| Whether the node is equal to the given node. More... | |
| virtual bool | IsEqual (const BTreeUserFunc &, const EqualVarsMap &) const |
| Whether the node is equal to the given node. More... | |
Public Member Functions inherited from TapeBase | |
| TapeBase (RegistrableRec regs=noRegistrable) | |
| Constructor. | |
| TapeBase (const TapeBase &) | |
| Copy-constructor. | |
| virtual | ~TapeBase () |
| Destructor. | |
| RegistrableRec | GetRegistrable () const |
| Whether the stream class is registrable. | |
| void | SetRegistrable (RegistrableRec regs=registrable) const |
| Set the state of registration of the stream class. | |
| virtual const char * | GetPureName (const VersionContainer &) const |
| Get the class name. | |
| virtual bool | IsFamilyRegistrable () const |
| Whether the object belongs to a registrable family. | |
Public Member Functions inherited from MbRefItem | |
| virtual MbeRefType | RefType () const |
| Registration type (for copying, duplication). | |
| void | AddRegistrator (MbRegDuplicate *reg) const |
| Add the register. | |
| void | RemoveRegistrator (MbRegDuplicate *reg) const |
| Remove the register. | |
| refcount_t | GetUseCount () const |
| Get count of references (get count of owners of an object). | |
| refcount_t | AddRef () const |
| Increase count of references by one. | |
| refcount_t | DecRef () const |
| Decrease count of references by one. | |
| refcount_t | Release () const |
| Decrease count of references by one and if count of references became zero, then remove itself. | |
Public Attributes | |
| BteNodeType | type |
| A type of node. | |
Protected Member Functions | |
| BTreeNode () | |
| Default constructor. | |
Protected Member Functions inherited from MbRefItem | |
| MbRefItem () | |
| Constructor without parameters. | |
Protected Attributes | |
| VarsDerives | varDers |
| Working variables. | |
Base class for nodes of the expression tree.
Base class for nodes of the expression tree.
|
pure virtual |
Calculate value.
Calculate value of node.
| [out] | fValue | - Value. |
Implemented in BTreeFunction, BTreeOperation1Arg, BTreeOperation, BTreeIdent, BTreeConst, BTreeOperation3Args, and BTreeUserFunc.
|
pure virtual |
Set value.
Set 'v' value to a tree node.
| [in] | v | - Desirable value. |
| [in] | unfixedDVars | - Variables which values can be changed. |
Implemented in BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeOperation, BTreeFunction, BTreeIdent, and BTreeConst.
|
inlinevirtual |
Calculate string value.
Calculate string value of node.
| [out] | varName | - Value. |
Reimplemented in BTreeIdent, BTreeOperation3Args, BTreeOperation1Arg, and BTreeOperation.
|
pure virtual |
Calculate a value and derivatives.
Calculate a value and derivatives.
| [out] | fValue | - Value. |
| [out] | derive1 | - The first derivative. |
| [out] | derive2 | - The second derivative. |
| [out] | derive3 | - The third derivative. |
| [in] | ders | - Set of values and derivatives. |
Implemented in BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeOperation, BTreeFunction, BTreeIdent, and BTreeConst.
| EquTreeResCode BTreeNode::CalculateDerives | ( | const ItCoord * | coord, |
| double & | v, | ||
| double & | fd, | ||
| double & | sd, | ||
| double & | td | ||
| ) | const |
Calculate a value and derivatives.
Calculate a value and derivatives.
| [in] | coord | - Coordinate. |
| [out] | v | - Value. |
| [out] | fd | - The first derivative. |
| [out] | sd | - The second derivative. |
| [out] | td | - The third derivative. |
|
pure virtual |
Get the used variables.
Get the used variables.
| [out] | arr | - Variables. |
| [out] | funcs | - User functions. |
Implemented in BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeOperation, BTreeFunction, BTreeIdent, and BTreeConst.
|
pure virtual |
Replace variables.
Replace all variables with the specified name by a new variable.
| [out] | varName | - Name. |
| [out] | newVar | - New variable. |
Implemented in BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeOperation, BTreeFunction, BTreeIdent, and BTreeConst.
|
pure virtual |
Replace a node.
Replace a node with a copy of a new one if the given variable is used.
| [out] | var | - Variable. |
| [out] | subTree | - New node. |
Implemented in BTreeOperation, BTreeFunction, BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeIdent, and BTreeConst.
|
inlinevirtual |
Replace variables.
Replace all variables with the specified name by a new variable.
| bool BTreeNode::GetExtremumPoints | ( | const c3d::DoublePair & | interval, |
| ItTreeVariable & | var, | ||
| c3d::DoubleVector & | points | ||
| ) |
Get value of parameter of extremum.
Get value of parameter of extremum if it is possible.
| [in] | interval | - Interval to search. |
| [in] | var | - Variable. |
| [out] | points | - Points of extremum. |
|
pure virtual |
Domain.
Domain.
| [in,out] | defRange | - Domain. |
| [out] | var | - Variable. |
| [in] | stopOnBreak | - Not to search the discontinuities in the definition domain. |
Implemented in BTreeOperation1Arg, BTreeIdent, BTreeConst, BTreeUserFunc, BTreeOperation3Args, BTreeOperation, and BTreeFunction.
|
pure virtual |
For internal use only! Order of variable.
Order of variable.
| [in] | var | - Variable. |
|
pure virtual |
Fixed variables.
Fixed variables.
| [in] | unfixedVars | - A set of unfixed variables. If variable was found in set, then fix the copy. |
| [in] | newFuncs | - User functions. |
| [out] | code | - Result codes of string parsing. |
Implemented in BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeOperation, BTreeFunction, BTreeIdent, and BTreeConst.
|
pure virtual |
Get string.
Get expression string.
| [out] | - | String. |
Implemented in BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeOperation, BTreeFunction, BTreeIdent, and BTreeConst.
|
pure virtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
| [in] | other | - Node for comparison. |
| [in] | varsMap | - A set of pairs of equal variables. |
Implemented in BTreeUserFunc, BTreeOperation3Args, BTreeOperation1Arg, BTreeOperation, BTreeFunction, BTreeIdent, and BTreeConst.
|
inlinevirtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
Reimplemented in BTreeConst.
|
inlinevirtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
Reimplemented in BTreeIdent.
|
inlinevirtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
Reimplemented in BTreeFunction.
|
inlinevirtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
Reimplemented in BTreeOperation.
|
inlinevirtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
Reimplemented in BTreeOperation1Arg.
|
inlinevirtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
Reimplemented in BTreeOperation3Args.
|
inlinevirtual |
Whether the node is equal to the given node.
Whether the node is equal to the given node.
Reimplemented in BTreeUserFunc.