Classes | Functions | Variables
PLMD::lepton Namespace Reference

Classes

class  AsmJitRuntimePtr
 
class  CompiledExpression
 A CompiledExpression is a highly optimized representation of an expression for cases when you want to evaluate it many times as quickly as possible. More...
 
class  CustomFunction
 This class is the interface for defining your own function that may be included in expressions. More...
 
class  Exception
 This class is used for all exceptions thrown by lepton. More...
 
class  ExpressionProgram
 An ExpressionProgram is a linear sequence of Operations for evaluating an expression. More...
 
class  ExpressionTreeNode
 This class represents a node in the abstract syntax tree representation of an expression. More...
 
class  Operation
 An Operation represents a single step in the evaluation of an expression, such as a function, an operator, or a constant value. More...
 
class  ParsedExpression
 This class represents the result of parsing an expression. More...
 
class  Parser
 This class provides the main interface for parsing expressions. More...
 
class  ParseToken
 

Functions

const std::map< std::string, double > & Constants ()
 
 LEPTON_CLASS_OPERATION (Acot, acot, ACOT, 1, std::atan(1.0/args[0]))
 
 LEPTON_CLASS_OPERATION (Asec, asec, ASEC, 1, std::acos(1.0/args[0]))
 
 LEPTON_CLASS_OPERATION (Acsc, acsc, ACSC, 1, std::asin(1.0/args[0]))
 
 LEPTON_CLASS_OPERATION (Coth, coth, ACOT, 1, 1.0/std::tanh(args[0]))
 
 LEPTON_CLASS_OPERATION (Sech, sech, SECH, 1, 1.0/std::cosh(args[0]))
 
 LEPTON_CLASS_OPERATION (Csch, csch, CSCH, 1, 1.0/std::sinh(args[0]))
 
 LEPTON_CLASS_OPERATION (Asinh, asinh, ASINH, 1, std::asinh(args[0]))
 
 LEPTON_CLASS_OPERATION (Acosh, acosh, ACOSH, 1, std::acosh(args[0]))
 
 LEPTON_CLASS_OPERATION (Atanh, atanh, ATANH, 1, std::atanh(args[0]))
 
 LEPTON_CLASS_OPERATION (Acoth, acoth, ACOTH, 1, 0.5 *std::log((args[0]+1.0)/(args[0]-1.0)))
 
 LEPTON_CLASS_OPERATION (Asech, asech, ASECH, 1, std::log(std::sqrt(1.0/args[0]-1.0) *std::sqrt(1.0/args[0]+1.0)+1.0/args[0]))
 
 LEPTON_CLASS_OPERATION (Acsch, acsch, ACSCH, 1, std::log(1.0/args[0]+std::sqrt(1.0/(args[0] *args[0])+1.0)))
 
 LEPTON_CLASS_OPERATION (Atan2, atan2, ATAN2, 2, std::atan2(args[0], args[1]))
 
LEPTON_EXPORT std::ostream & operator<< (std::ostream &out, const ExpressionTreeNode &node)
 
LEPTON_EXPORT std::ostream & operator<< (std::ostream &out, const ParsedExpression &exp)
 
bool useAsmJit ()
 

Variables

static const string Digits = "0123456789"
 
static const bool LeftAssociative [] = {true, true, true, true, false}
 
static const Operation::Id OperationId [] = {Operation::ADD, Operation::SUBTRACT, Operation::MULTIPLY, Operation::DIVIDE, Operation::POWER}
 
static const string Operators = "+-*/^"
 
static const int Precedence [] = {0, 0, 1, 1, 3}
 

Function Documentation

◆ Constants()

const std::map< std::string, double > & PLMD::lepton::Constants ( )

◆ LEPTON_CLASS_OPERATION() [1/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Acot  ,
acot  ,
ACOT  ,
,
std::atan(1.0/args[0])   
)

◆ LEPTON_CLASS_OPERATION() [2/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Asec  ,
asec  ,
ASEC  ,
,
std::acos(1.0/args[0])   
)

◆ LEPTON_CLASS_OPERATION() [3/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Acsc  ,
acsc  ,
ACSC  ,
,
std::asin(1.0/args[0])   
)

◆ LEPTON_CLASS_OPERATION() [4/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Coth  ,
coth  ,
ACOT  ,
,
1.0/  std::tanhargs[0] 
)

◆ LEPTON_CLASS_OPERATION() [5/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Sech  ,
sech  ,
SECH  ,
,
1.0/  std::coshargs[0] 
)

◆ LEPTON_CLASS_OPERATION() [6/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Csch  ,
csch  ,
CSCH  ,
,
1.0/  std::sinhargs[0] 
)

◆ LEPTON_CLASS_OPERATION() [7/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Asinh  ,
asinh  ,
ASINH  ,
,
std::asinh(args[0])   
)

◆ LEPTON_CLASS_OPERATION() [8/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Acosh  ,
acosh  ,
ACOSH  ,
,
std::acosh(args[0])   
)

◆ LEPTON_CLASS_OPERATION() [9/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Atanh  ,
atanh  ,
ATANH  ,
,
std::atanh(args[0])   
)

◆ LEPTON_CLASS_OPERATION() [10/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Acoth  ,
acoth  ,
ACOTH  ,
,
0.5 *  std::log(args[0]+1.0)/(args[0]-1.0) 
)

◆ LEPTON_CLASS_OPERATION() [11/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Asech  ,
asech  ,
ASECH  ,
,
std::log(std::sqrt(1.0/args[0]-1.0) *std::sqrt(1.0/args[0]+1.0)+1.0/args[0])   
)

◆ LEPTON_CLASS_OPERATION() [12/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Acsch  ,
acsch  ,
ACSCH  ,
,
std::log(1.0/args[0]+std::sqrt(1.0/(args[0] *args[0])+1.0))   
)

◆ LEPTON_CLASS_OPERATION() [13/13]

PLMD::lepton::LEPTON_CLASS_OPERATION ( Atan2  ,
atan2  ,
ATAN2  ,
,
std::atan2(args[0], args[1])   
)

◆ operator<<() [1/2]

ostream & PLMD::lepton::operator<< ( std::ostream &  out,
const ExpressionTreeNode node 
)

◆ operator<<() [2/2]

ostream & PLMD::lepton::operator<< ( std::ostream &  out,
const ParsedExpression exp 
)

◆ useAsmJit()

bool PLMD::lepton::useAsmJit ( )

Variable Documentation

◆ Digits

const string PLMD::lepton::Digits = "0123456789"
static

◆ LeftAssociative

const bool PLMD::lepton::LeftAssociative[] = {true, true, true, true, false}
static

◆ OperationId

◆ Operators

const string PLMD::lepton::Operators = "+-*/^"
static

◆ Precedence

const int PLMD::lepton::Precedence[] = {0, 0, 1, 1, 3}
static