bpp-core3  3.0.0
bpp::BinaryOperator Class Reference

Binary arithmetic operator for numerical computation. More...

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

+ Inheritance diagram for bpp::BinaryOperator:
+ Collaboration diagram for bpp::BinaryOperator:

Public Member Functions

 BinaryOperator (char symb, std::shared_ptr< Operator > left, std::shared_ptr< Operator > right)
 
BinaryOperatorclone () const
 Create a copy of this object and send a pointer to it. More...
 
std::shared_ptr< OperatorgetLeftSon ()
 
std::shared_ptr< OperatorgetRightSon ()
 
char getSymbol () const
 
double getValue () const
 
double getFirstOrderDerivative (const std::string &variable) const
 
double getSecondOrderDerivative (const std::string &variable) const
 
std::string output () const
 

Private Attributes

char symb_
 
std::shared_ptr< Operatorleft_
 
std::shared_ptr< Operatorright_
 

Detailed Description

Binary arithmetic operator for numerical computation.

Definition at line 19 of file BinaryOperator.h.

Constructor & Destructor Documentation

◆ BinaryOperator()

bpp::BinaryOperator::BinaryOperator ( char  symb,
std::shared_ptr< Operator left,
std::shared_ptr< Operator right 
)
inline

Definition at line 28 of file BinaryOperator.h.

Referenced by clone().

Member Function Documentation

◆ clone()

BinaryOperator* bpp::BinaryOperator::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 32 of file BinaryOperator.h.

References BinaryOperator().

◆ getFirstOrderDerivative()

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

Implements bpp::Operator.

Definition at line 72 of file BinaryOperator.h.

◆ getLeftSon()

std::shared_ptr<Operator> bpp::BinaryOperator::getLeftSon ( )
inline

Definition at line 37 of file BinaryOperator.h.

References left_.

◆ getRightSon()

std::shared_ptr<Operator> bpp::BinaryOperator::getRightSon ( )
inline

Definition at line 42 of file BinaryOperator.h.

References right_.

◆ getSecondOrderDerivative()

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

Implements bpp::Operator.

Definition at line 98 of file BinaryOperator.h.

◆ getSymbol()

char bpp::BinaryOperator::getSymbol ( ) const
inline

Definition at line 47 of file BinaryOperator.h.

References symb_.

Referenced by bpp::ComputationTree::isAllSum().

◆ getValue()

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

Implements bpp::Operator.

Definition at line 52 of file BinaryOperator.h.

◆ output()

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

Implements bpp::Operator.

Definition at line 130 of file BinaryOperator.h.

Member Data Documentation

◆ left_

std::shared_ptr<Operator> bpp::BinaryOperator::left_
private

Definition at line 25 of file BinaryOperator.h.

Referenced by getLeftSon().

◆ right_

std::shared_ptr<Operator> bpp::BinaryOperator::right_
private

Definition at line 25 of file BinaryOperator.h.

Referenced by getRightSon().

◆ symb_

char bpp::BinaryOperator::symb_
private

Definition at line 23 of file BinaryOperator.h.

Referenced by getSymbol().


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