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::expression_parser::VariableExpression Class Reference

#include <Arithmetic.hh>

Inheritance diagram for numeric::expression_parser::VariableExpression:
Inheritance graph
[legend]

Public Member Functions

 VariableExpression (std::string name)
 
 VariableExpression (std::string name, numeric::Real value)
 
numeric::Real operator() () const override
 
void set_value (numeric::Real value)
 
std::string name () const
 
ExpressionCOP differentiate (std::string const &varname) const override
 Returns the literal expression 1 if name_ == varname_ and null otherwise. More...
 
std::list< std::string > active_variables () const override
 
- Public Member Functions inherited from numeric::expression_parser::Expression
 ~Expression () override
 Automatically generated virtual destructor for class deriving directly from VirtualBase. 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 name_
 
numeric::Real value_
 

Constructor & Destructor Documentation

numeric::expression_parser::VariableExpression::VariableExpression ( std::string  name)
numeric::expression_parser::VariableExpression::VariableExpression ( std::string  name,
numeric::Real  value 
)

Member Function Documentation

std::list< std::string > numeric::expression_parser::VariableExpression::active_variables ( ) const
overridevirtual
ExpressionCOP numeric::expression_parser::VariableExpression::differentiate ( std::string const &  varname) const
overridevirtual

Returns the literal expression 1 if name_ == varname_ and null otherwise.

Implements numeric::expression_parser::Expression.

References name_.

std::string numeric::expression_parser::VariableExpression::name ( ) const

References name_.

numeric::Real numeric::expression_parser::VariableExpression::operator() ( ) const
overridevirtual
void numeric::expression_parser::VariableExpression::set_value ( numeric::Real  value)

References value, and value_.

Member Data Documentation

std::string numeric::expression_parser::VariableExpression::name_
private
numeric::Real numeric::expression_parser::VariableExpression::value_
private

Referenced by operator()(), and set_value().


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