API Documentation
Loading...
Searching...
No Matches
Equation< t_type > Class Template Reference

Stores in a compressed way, a formula that can be solved. A formula is made of up variables, numbers, and operations. Formulas can be simplified, or potentially solved to a numeric value. More...

#include <Equation.h>

Collaboration diagram for Equation< t_type >:
[legend]

Classes

struct  EquationPart
 

Public Member Functions

void add (char operation, const String &value)
 
void add (char operation, t_type value)
 
void addOrderOfOps (char operation, t_type value)
 
 Equation ()
 
void refreshVariables ()
 
void setVariable (const String &var, t_type value)
 
t_type solve () const
 
t_type solve (t_type start, uint04 &current_index) const
 

Static Public Member Functions

static uint04 getOrderPriority (const char op)
 
static t_type solve (t_type left, const char op, t_type right)
 

Public Attributes

Buffer< EquationPartm_equation_stack
 
Dictionary< String, Buffer< uint04 > > m_variable_locations
 
Dictionary< String, t_type > m_variables
 

Detailed Description

template<class t_type>
class NDEVR::Equation< t_type >

Stores in a compressed way, a formula that can be solved. A formula is made of up variables, numbers, and operations. Formulas can be simplified, or potentially solved to a numeric value.


Constructor & Destructor Documentation

◆ Equation()

template<class t_type >
Equation ( )
inline

Member Function Documentation

◆ add() [1/2]

template<class t_type >
void add ( char operation,
const String & value )
inline

◆ add() [2/2]

template<class t_type >
void add ( char operation,
t_type value )
inline

◆ addOrderOfOps()

template<class t_type >
void addOrderOfOps ( char operation,
t_type value )
inline

◆ getOrderPriority()

template<class t_type >
static uint04 getOrderPriority ( const char op)
inlinestatic

◆ refreshVariables()

template<class t_type >
void refreshVariables ( )
inline

◆ setVariable()

template<class t_type >
void setVariable ( const String & var,
t_type value )
inline

◆ solve() [1/3]

template<class t_type >
t_type solve ( ) const
inline

◆ solve() [2/3]

template<class t_type >
static t_type solve ( t_type left,
const char op,
t_type right )
inlinestatic

◆ solve() [3/3]

template<class t_type >
t_type solve ( t_type start,
uint04 & current_index ) const
inline

Member Data Documentation

◆ m_equation_stack

template<class t_type >
Buffer<EquationPart> m_equation_stack

◆ m_variable_locations

template<class t_type >
Dictionary<String, Buffer<uint04> > m_variable_locations

◆ m_variables

template<class t_type >
Dictionary<String, t_type> m_variables

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