bpp-core3  3.0.0
bpp::FunctionOperator< F > Class Template Reference

Implements a double operator (ie leaf in the computation tree) where value comes from a function. More...

#include <Bpp/Numeric/Function/Operators/FunctionOperator.h>

+ Inheritance diagram for bpp::FunctionOperator< F >:
+ Collaboration diagram for bpp::FunctionOperator< F >:

Public Member Functions

 FunctionOperator (F &func, std::string name)
 
FunctionOperatorclone () const
 Create a copy of this object and send a pointer to it. More...
 
double getValue () const
 
double getFirstOrderDerivative (const std::string &variable) const
 
double getSecondOrderDerivative (const std::string &variable) const
 
std::string getName () const
 
std::string output () const
 

Private Member Functions

double getValue_ (std::true_type) const
 
double getValue_ (std::false_type) const
 
double getFirstOrderDerivative_ (const std::string &variable, std::true_type) const
 
double getFirstOrderDerivative_ (const std::string &variable, std::false_type) const
 
double getSecondOrderDerivative_ (const std::string &variable, std::true_type) const
 
double getSecondOrderDerivative_ (const std::string &variable, std::false_type) const
 

Private Attributes

F & func_
 
std::string name_
 

Detailed Description

template<class F>
class bpp::FunctionOperator< F >

Implements a double operator (ie leaf in the computation tree) where value comes from a function.

Definition at line 21 of file FunctionOperator.h.

Constructor & Destructor Documentation

◆ FunctionOperator()

template<class F >
bpp::FunctionOperator< F >::FunctionOperator ( F &  func,
std::string  name 
)
inline

Definition at line 60 of file FunctionOperator.h.

Referenced by bpp::FunctionOperator< F >::clone().

Member Function Documentation

◆ clone()

template<class F >
FunctionOperator* bpp::FunctionOperator< F >::clone ( ) const
inlinevirtual

Create a copy of this object and send a pointer to it.

Returns
A pointer toward the copy object.

Implements bpp::Clonable.

Definition at line 64 of file FunctionOperator.h.

References bpp::FunctionOperator< F >::FunctionOperator().

◆ getFirstOrderDerivative()

template<class F >
double bpp::FunctionOperator< F >::getFirstOrderDerivative ( const std::string &  variable) const
inlinevirtual

◆ getFirstOrderDerivative_() [1/2]

template<class F >
double bpp::FunctionOperator< F >::getFirstOrderDerivative_ ( const std::string &  variable,
std::true_type   
) const
inlineprivate

◆ getFirstOrderDerivative_() [2/2]

template<class F >
double bpp::FunctionOperator< F >::getFirstOrderDerivative_ ( const std::string &  variable,
std::false_type   
) const
inlineprivate

Definition at line 44 of file FunctionOperator.h.

◆ getName()

template<class F >
std::string bpp::FunctionOperator< F >::getName ( ) const
inline

Definition at line 84 of file FunctionOperator.h.

References bpp::FunctionOperator< F >::name_.

◆ getSecondOrderDerivative()

template<class F >
double bpp::FunctionOperator< F >::getSecondOrderDerivative ( const std::string &  variable) const
inlinevirtual

◆ getSecondOrderDerivative_() [1/2]

template<class F >
double bpp::FunctionOperator< F >::getSecondOrderDerivative_ ( const std::string &  variable,
std::true_type   
) const
inlineprivate

◆ getSecondOrderDerivative_() [2/2]

template<class F >
double bpp::FunctionOperator< F >::getSecondOrderDerivative_ ( const std::string &  variable,
std::false_type   
) const
inlineprivate

Definition at line 54 of file FunctionOperator.h.

◆ getValue()

template<class F >
double bpp::FunctionOperator< F >::getValue ( ) const
inlinevirtual

Implements bpp::Operator.

Definition at line 69 of file FunctionOperator.h.

References bpp::FunctionOperator< F >::getValue_().

◆ getValue_() [1/2]

template<class F >
double bpp::FunctionOperator< F >::getValue_ ( std::true_type  ) const
inlineprivate

Definition at line 29 of file FunctionOperator.h.

Referenced by bpp::FunctionOperator< F >::getValue().

◆ getValue_() [2/2]

template<class F >
double bpp::FunctionOperator< F >::getValue_ ( std::false_type  ) const
inlineprivate

Definition at line 34 of file FunctionOperator.h.

◆ output()

template<class F >
std::string bpp::FunctionOperator< F >::output ( ) const
inlinevirtual

Implements bpp::Operator.

Definition at line 89 of file FunctionOperator.h.

References bpp::FunctionOperator< F >::name_.

Member Data Documentation

◆ func_

template<class F >
F& bpp::FunctionOperator< F >::func_
private

Definition at line 25 of file FunctionOperator.h.

◆ name_

template<class F >
std::string bpp::FunctionOperator< F >::name_
private

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