bpp-core3  3.0.0
bpp::MathOperator Class Reference

Implements a unary operator that applies a math (described in cmath) operator. More...

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

+ Inheritance diagram for bpp::MathOperator:
+ Collaboration diagram for bpp::MathOperator:

Public Member Functions

 MathOperator (double(*func)(double), std::string name, std::shared_ptr< Operator > son)
 
MathOperatorclone () const
 Create a copy of this object and send a pointer to it. More...
 
std::shared_ptr< OperatorgetSon ()
 
double getValue () const
 
std::string getName () const
 
double getFirstOrderDerivative (const std::string &variable) const
 1st order derivative More...
 
double getSecondOrderDerivative (const std::string &variable) const
 
std::string output () const
 

Private Attributes

double(* func_ )(double)
 
std::string name_
 
std::shared_ptr< Operatorson_
 

Detailed Description

Implements a unary operator that applies a math (described in cmath) operator.

Definition at line 20 of file MathOperator.h.

Constructor & Destructor Documentation

◆ MathOperator()

bpp::MathOperator::MathOperator ( double(*)(double)  func,
std::string  name,
std::shared_ptr< Operator son 
)
inline

Definition at line 36 of file MathOperator.h.

Referenced by clone().

Member Function Documentation

◆ clone()

MathOperator* bpp::MathOperator::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 40 of file MathOperator.h.

References MathOperator().

◆ getFirstOrderDerivative()

double bpp::MathOperator::getFirstOrderDerivative ( const std::string &  variable) const
inlinevirtual

1st order derivative

Implements bpp::Operator.

Definition at line 67 of file MathOperator.h.

◆ getName()

std::string bpp::MathOperator::getName ( ) const
inline

Definition at line 58 of file MathOperator.h.

References name_.

◆ getSecondOrderDerivative()

double bpp::MathOperator::getSecondOrderDerivative ( const std::string &  variable) const
inlinevirtual

Implements bpp::Operator.

Definition at line 80 of file MathOperator.h.

◆ getSon()

std::shared_ptr<Operator> bpp::MathOperator::getSon ( )
inline

Definition at line 45 of file MathOperator.h.

References son_.

◆ getValue()

double bpp::MathOperator::getValue ( ) const
inlinevirtual

Implements bpp::Operator.

Definition at line 50 of file MathOperator.h.

References func_.

◆ output()

std::string bpp::MathOperator::output ( ) const
inlinevirtual

Implements bpp::Operator.

Definition at line 96 of file MathOperator.h.

Member Data Documentation

◆ func_

double(* bpp::MathOperator::func_) (double)
private

Definition at line 29 of file MathOperator.h.

Referenced by getValue().

◆ name_

std::string bpp::MathOperator::name_
private

Definition at line 31 of file MathOperator.h.

Referenced by getName().

◆ son_

std::shared_ptr<Operator> bpp::MathOperator::son_
private

Definition at line 33 of file MathOperator.h.

Referenced by getSon().


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