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 57 of file FunctionOperator.h.

Constructor & Destructor Documentation

◆ FunctionOperator()

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

Definition at line 96 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 100 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::false_type   
) const
inlineprivate

Definition at line 80 of file FunctionOperator.h.

◆ getFirstOrderDerivative_() [2/2]

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

◆ getName()

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

Definition at line 120 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::false_type   
) const
inlineprivate

Definition at line 90 of file FunctionOperator.h.

◆ getSecondOrderDerivative_() [2/2]

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

◆ getValue()

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

Implements bpp::Operator.

Definition at line 105 of file FunctionOperator.h.

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

◆ getValue_() [1/2]

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

Definition at line 70 of file FunctionOperator.h.

◆ getValue_() [2/2]

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

◆ output()

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

Implements bpp::Operator.

Definition at line 125 of file FunctionOperator.h.

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

Member Data Documentation

◆ func_

◆ name_

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

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