OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
matheval::detail::SimpleMathParser< real_t > Class Template Reference

#include <matheval.hpp>

Public Member Functions

 SimpleMathParser (std::string_view input)
 
expr_ast< real_t > parse ()
 

Private Member Functions

void skipWhitespace ()
 
bool match (char c)
 
bool match (const std::string &str)
 
void expect (char c)
 
expr_ast< real_t > parseExpression ()
 
expr_ast< real_t > parseTerm ()
 
expr_ast< real_t > parseFactor ()
 
expr_ast< real_t > parsePrimary ()
 
expr_ast< real_t > parseNumber ()
 
std::string parseIdentifier ()
 

Static Private Member Functions

static const std::array< std::pair< std::string_view, real_t >, 4 > & getConstants ()
 
static const std::array< std::pair< std::string_view, typename unary_op< real_t >::op_t >, 31 > & getUnaryFunctions ()
 
static const std::array< std::pair< std::string_view, typename binary_op< real_t >::op_t >, 4 > & getBinaryFunctions ()
 

Private Attributes

std::string_view input_
 
size_t pos_
 

Detailed Description

template<typename real_t>
class matheval::detail::SimpleMathParser< real_t >

Definition at line 416 of file matheval.hpp.

Constructor & Destructor Documentation

◆ SimpleMathParser()

template<typename real_t >
matheval::detail::SimpleMathParser< real_t >::SimpleMathParser ( std::string_view  input)
inline

Definition at line 418 of file matheval.hpp.

Member Function Documentation

◆ expect()

template<typename real_t >
void matheval::detail::SimpleMathParser< real_t >::expect ( char  c)
inlineprivate

Definition at line 460 of file matheval.hpp.

◆ getBinaryFunctions()

template<typename real_t >
static const std::array< std::pair< std::string_view, typename binary_op< real_t >::op_t >, 4 > & matheval::detail::SimpleMathParser< real_t >::getBinaryFunctions ( )
inlinestaticprivate

Definition at line 678 of file matheval.hpp.

◆ getConstants()

template<typename real_t >
static const std::array< std::pair< std::string_view, real_t >, 4 > & matheval::detail::SimpleMathParser< real_t >::getConstants ( )
inlinestaticprivate

Definition at line 631 of file matheval.hpp.

References Physics::e, and Physics::pi.

◆ getUnaryFunctions()

template<typename real_t >
static const std::array< std::pair< std::string_view, typename unary_op< real_t >::op_t >, 31 > & matheval::detail::SimpleMathParser< real_t >::getUnaryFunctions ( )
inlinestaticprivate

Definition at line 641 of file matheval.hpp.

◆ match() [1/2]

template<typename real_t >
bool matheval::detail::SimpleMathParser< real_t >::match ( char  c)
inlineprivate

Definition at line 442 of file matheval.hpp.

◆ match() [2/2]

template<typename real_t >
bool matheval::detail::SimpleMathParser< real_t >::match ( const std::string &  str)
inlineprivate

Definition at line 451 of file matheval.hpp.

◆ parse()

template<typename real_t >
expr_ast< real_t > matheval::detail::SimpleMathParser< real_t >::parse ( )
inline

Definition at line 421 of file matheval.hpp.

Referenced by matheval::detail::parse().

◆ parseExpression()

template<typename real_t >
expr_ast< real_t > matheval::detail::SimpleMathParser< real_t >::parseExpression ( )
inlineprivate

Definition at line 466 of file matheval.hpp.

◆ parseFactor()

template<typename real_t >
expr_ast< real_t > matheval::detail::SimpleMathParser< real_t >::parseFactor ( )
inlineprivate

Definition at line 497 of file matheval.hpp.

References pow().

Here is the call graph for this function:

◆ parseIdentifier()

template<typename real_t >
std::string matheval::detail::SimpleMathParser< real_t >::parseIdentifier ( )
inlineprivate

Definition at line 617 of file matheval.hpp.

◆ parseNumber()

template<typename real_t >
expr_ast< real_t > matheval::detail::SimpleMathParser< real_t >::parseNumber ( )
inlineprivate

Definition at line 571 of file matheval.hpp.

◆ parsePrimary()

template<typename real_t >
expr_ast< real_t > matheval::detail::SimpleMathParser< real_t >::parsePrimary ( )
inlineprivate

Definition at line 508 of file matheval.hpp.

References arg().

Here is the call graph for this function:

◆ parseTerm()

template<typename real_t >
expr_ast< real_t > matheval::detail::SimpleMathParser< real_t >::parseTerm ( )
inlineprivate

Definition at line 480 of file matheval.hpp.

References fmod().

Here is the call graph for this function:

◆ skipWhitespace()

template<typename real_t >
void matheval::detail::SimpleMathParser< real_t >::skipWhitespace ( )
inlineprivate

Definition at line 436 of file matheval.hpp.

Member Data Documentation

◆ input_

template<typename real_t >
std::string_view matheval::detail::SimpleMathParser< real_t >::input_
private

Definition at line 433 of file matheval.hpp.

◆ pos_

template<typename real_t >
size_t matheval::detail::SimpleMathParser< real_t >::pos_
private

Definition at line 434 of file matheval.hpp.


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