The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::statistics::expression Namespace Reference

Namespace containing methods for parsing, building, and evaluating statistical expressions in sparta. More...

Namespaces

namespace  grammar
 Statistical Expression Grammar.
 

Classes

struct  BinaryFunction
 Represents a Binary function node. More...
 
struct  Constant
 
class  Expression
 Expression container/builder. Contains a single ExpressionNode representing the root of an expression tree. This is the object on which the parser operates to build an expression incrementally through basic operators. More...
 
class  ExpressionNode
 Abstract interface class for an item in an expression. Subclasses can contain other ExpressionNodes. More...
 
class  ExpressionParser
 Class for parsing statistical expressions based on a specific TreeNode context. More...
 
struct  Operation
 Operation Node (e.g. +,-,*,/) More...
 
struct  ReferenceVariable
 Expression node for a reference to a double. Anything that cannot actually vary can be handled as a constant through Expression. If it can vary, however, it should be handled through this or SimVariable (for functions) More...
 
struct  SimVariable
 Expression node for a simulation variable. Anything that cannot actually vary within a simulation can be handled as a Constant. If it can vary, however, it should be handled through this. More...
 
struct  StatVariable
 
struct  TernaryFunction
 Represents a Ternary function node. More...
 
struct  UnaryFunction
 Represents a Unary function node. More...
 

Enumerations

enum  operation_t {
  OP_NULL = 0 , OP_ADD = '+' , OP_SUB = '-' , OP_MUL = '*' ,
  OP_DIV = '/' , OP_NEGATE = 'n' , OP_PROMOTE = 'p' , OP_FORWARD = 'f'
}
 Types of operations supported. More...
 

Functions

std::ostream & operator<< (std::ostream &o, const sparta::statistics::expression::Expression &ex)
 Ostream printing function for Expressions.
 

Detailed Description

Namespace containing methods for parsing, building, and evaluating statistical expressions in sparta.

Enumeration Type Documentation

◆ operation_t

Types of operations supported.

Enumerator
OP_NULL 

No operation.

OP_ADD 

Addition.

OP_SUB 

Subtraction.

OP_MUL 

Multiplication.

OP_DIV 

Division.

OP_NEGATE 

Negation: -x.

OP_PROMOTE 

Promotion: +x.

OP_FORWARD 

Forwarding: (x)

Definition at line 18 of file ExpressionNode.hpp.

Function Documentation

◆ operator<<()

std::ostream & sparta::statistics::expression::operator<< ( std::ostream &  o,
const sparta::statistics::expression::Expression ex 
)
inline

Ostream printing function for Expressions.

Definition at line 793 of file Expression.hpp.

Here is the call graph for this function: