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 55 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 64 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 68 of file BinaryOperator.h.

References BinaryOperator().

◆ getFirstOrderDerivative()

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

Implements bpp::Operator.

Definition at line 108 of file BinaryOperator.h.

References left_, right_, and symb_.

◆ getLeftSon()

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

Definition at line 73 of file BinaryOperator.h.

References left_.

◆ getRightSon()

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

Definition at line 78 of file BinaryOperator.h.

References right_.

◆ getSecondOrderDerivative()

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

Implements bpp::Operator.

Definition at line 134 of file BinaryOperator.h.

References left_, right_, and symb_.

◆ getSymbol()

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

Definition at line 83 of file BinaryOperator.h.

References symb_.

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

◆ getValue()

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

Implements bpp::Operator.

Definition at line 88 of file BinaryOperator.h.

References left_, right_, and symb_.

◆ output()

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

Implements bpp::Operator.

Definition at line 166 of file BinaryOperator.h.

References left_, right_, and symb_.

Member Data Documentation

◆ left_

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

◆ right_

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

◆ symb_

char bpp::BinaryOperator::symb_
private

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