Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
numeric::Calculator Class Reference

#include <Calculator.hh>

Inheritance diagram for numeric::Calculator:
Inheritance graph
[legend]

Public Member Functions

 ~Calculator () override
 
 Calculator (std::string const &equation)
 
bool compute (std::map< std::string, Real > &values, Real &output) const
 Calculate the value of the equation, putting it in output Return true if the computation failed. More...
 
std::string const & equation () const
 Get access to the equation held in this object. More...
 
- Public Member Functions inherited from utility::VirtualBase
 VirtualBase ()=default
 Default constructor. More...
 
virtual ~VirtualBase ()=default
 The virtual destructor is one of the main reasons for the VirtualBase class. More...
 
 VirtualBase (VirtualBase const &)=default
 
 VirtualBase (VirtualBase &&)=default
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Private Attributes

std::string equation_
 

Constructor & Destructor Documentation

numeric::Calculator::~Calculator ( )
overridedefault
numeric::Calculator::Calculator ( std::string const &  equation)

Member Function Documentation

bool numeric::Calculator::compute ( std::map< std::string, Real > &  values,
Real output 
) const

Calculate the value of the equation, putting it in output Return true if the computation failed.

References equation(), equation_, basic::options::OptionKeys::cp::output, numeric::CalculatorParser::parser(), ObjexxFCL::space(), and loops_kic::success.

std::string const& numeric::Calculator::equation ( ) const
inline

Get access to the equation held in this object.

References equation_.

Referenced by compute().

Member Data Documentation

std::string numeric::Calculator::equation_
private

Referenced by compute(), and equation().


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