nil::crypto3::math::expressions Namespace Reference

Namespaces

 detail
 

Classes

class  Parser
 Parse a mathematical expression. More...
 

Functions

double parse (std::string const &expr, std::map< std::string, double > const &st={})
 Convenience function. More...
 

Function Documentation

◆ parse()

double nil::crypto3::math::expressions::parse ( std::string const &  expr,
std::map< std::string, double > const &  st = {} 
)
inline

Convenience function.

This function builds the grammar, parses the iterator to an AST, evaluates it, and returns the result.

Parameters
[in]exprmathematical expression
[in]stthe symbol table for variables