|
C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
User-defined function. More...
#include <pars_user_function.h>
Inheritance diagram for MbUserFunc:
Collaboration diagram for MbUserFunc:Public Member Functions | |
| MbUserFunc (const c3d::string_t &name, const std::vector< c3d::string_t > &pars) | |
| Constructor by function name and array of arguments. | |
| MbUserFunc (const MbUserFunc &other) | |
| Copy-constructor. | |
| MbUserFunc (const c3d::string_t &name) | |
| Constructor by function name. | |
| ItUserFunc & | Duplicate () const override |
| Create a copy. | |
| const c3d::string_t & | GetName () const override |
| Get function name. | |
| bool | GetDefRange (DefRange &, ItTreeVariable &var, const std::vector< BTreeNode * > &) const override |
| Get function domain. | |
| bool | GetDefRange (DefRange &, size_t ind, bool stopOnBreak) const |
| Get function domain. More... | |
| size_t | GetParsCount () const override |
| Parameters (arguments) count. | |
| void | GetExternalVars (SSArray< ItTreeVariable * > &vars, SSArray< ItUserFunc * > &funcs) const override |
| External variables. | |
| bool | IsEqual (const ItUserFunc &other) const override |
| Compare symbolic (user-defined) functions. | |
| bool | IsEqual (const MbUserFunc &) const override |
| Compare symbolic (user-defined) functions. | |
| EquTreeResCode | GetValue (const SArray< double > ¶ms, double &v) const override |
| Calculate the value of a function in a case of arguments array. | |
| EquTreeResCode | GetDerivates (const SArray< DerivesValues > ¶ms, double &v, double &fd, double &sd, double &td, size_t dIndex=0) const override |
| Calculate the value of a function and derivatives in a case of arguments array. | |
| EquTreeResCode | GetValue (double t, double &v) const |
| Calculate the value of a function in a case of one argument. | |
| EquTreeResCode | GetDerivates (double t, double &v, double &fd, double &sd, double &td) const |
| Calculate the value of a function and derivatives in a case of one argument. | |
| bool | IsConst () const |
| Function is const. | |
| bool | IsLine () const |
| Function is linear. | |
| EquTreeResCode | SetExpression (const c3d::string_t &expr, const BTreeNode &tree) |
| Set expression. | |
| const c3d::string_t & | GetExpression () const |
| Get expression. | |
| const BTreeNode & | GetTree () const |
| Get expression parsing tree. | |
| bool | IsEqualValue (const MbUserFunc &other) const |
| Comparison with user-defined function. | |
| bool | GetExtremumPoints (size_t parIndex, const c3d::DoublePair &interval, c3d::DoubleVector &points) |
| Get an array of parameters of singular points for the argument which is given by the index on the given interval. | |
| void | GetPars (RPArray< ItTreeVariable > &pars) const |
| Get array of parameters. | |
| ItTreeVariable * | GetPar (size_t i) const |
| Get argument by index. | |
| void | WritingBeginEnd (bool begin) |
| Prepare an object for writing. | |
| const MbUserFunc & | operator= (const MbUserFunc &) |
| Assignment operator. | |
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 MbSyncItem | |
| void | Lock () const |
| Switch lock on (locking happens only in parallel region). | |
| void | Unlock () const |
| Switch lock off if locking has been set. | |
Protected Attributes | |
| c3d::string_t | m_name |
| A name of user-defined function. | |
| c3d::string_t | m_expression |
| Expression. | |
| BTreeNode * | m_tree |
| A tree of expression parsing (it should be for sure). | |
| IFC_Array< MbTreeVariable > | m_vars |
| Formal parameters of function. | |
| PArray< ItUserFunc > | m_intFuncs |
| Internal functions. | |
User-defined function.
User-defined function.
| bool MbUserFunc::GetDefRange | ( | DefRange & | , |
| size_t | ind, | ||
| bool | stopOnBreak | ||
| ) | const |
Get function domain.
Get the function domain for the parameter with index ind. The method cuts from the initial domain some parts where the function is not defined.
| [in,out] | dr | - It is initialized by some start range. The output value will be the intersection between this range and the true function domain. |
| [in] | ind | - An index of the variable, which the domain is searched for. |
| [in] | stopOnBreak | - Searching will be stopped if the first break is found. |