Minsky
minsky::anonymous_namespace{userFunction.cc}::ExprTkCallableFunction Struct Reference
Inheritance diagram for minsky::anonymous_namespace{userFunction.cc}::ExprTkCallableFunction:
Inheritance graph
Collaboration diagram for minsky::anonymous_namespace{userFunction.cc}::ExprTkCallableFunction:
Collaboration graph

Public Member Functions

 ExprTkCallableFunction (const std::weak_ptr< CallableFunction > &f)
 
double operator() (const std::vector< double > &x)
 

Public Attributes

std::weak_ptr< CallableFunctionf
 

Detailed Description

Definition at line 114 of file userFunction.cc.

Constructor & Destructor Documentation

◆ ExprTkCallableFunction()

minsky::anonymous_namespace{userFunction.cc}::ExprTkCallableFunction::ExprTkCallableFunction ( const std::weak_ptr< CallableFunction > &  f)
inline

Definition at line 117 of file userFunction.cc.

Member Function Documentation

◆ operator()()

double minsky::anonymous_namespace{userFunction.cc}::ExprTkCallableFunction::operator() ( const std::vector< double > &  x)
inline

Definition at line 118 of file userFunction.cc.

References f.

118  {
119  if (auto sf=f.lock())
120  return (*sf)(x);
121  return nan("");
122  }

Member Data Documentation

◆ f

std::weak_ptr<CallableFunction> minsky::anonymous_namespace{userFunction.cc}::ExprTkCallableFunction::f

Definition at line 116 of file userFunction.cc.


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