Documentation of CSL
Data Structures | Namespaces | Functions | Variables
literal.h File Reference
#include "buildingBlock.h"
#include "variableParent.h"
Include dependency graph for literal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  csl::AbstractLiteral
 Abstract class from which derive literal building blocks: Constant, Variable, Imaginary and IntFactorial. More...
 
class  csl::Constant
 Handle an object with a name and a value. More...
 
class  csl::Variable
 Handle an object with a name and a value. More...
 
class  csl::IntFactorial
 Handles factorial of a Number. More...
 
class  csl::Imaginary
 Numerical representation of i. More...
 

Namespaces

 csl
 Namespace for csl library.
 

Functions

Expr csl::intfactorial_s (int value)
 
Expr csl::constant_s (std::string const &name, csl::ComplexProperty prop=csl::ComplexProperty::Real)
 
Expr csl::constant_s (std::string const &name, long double value, csl::ComplexProperty prop=csl::ComplexProperty::Real)
 
Expr csl::constant_s (std::string const &name, Expr const &value, csl::ComplexProperty prop=csl::ComplexProperty::Real)
 
Expr csl::variable_s (std::string const &name, csl::ComplexProperty prop=csl::ComplexProperty::Real)
 
Expr csl::variable_s (std::string const &name, long double value, csl::ComplexProperty prop=csl::ComplexProperty::Real)
 
Expr csl::variable_s (std::string const &name, Expr const &value, csl::ComplexProperty prop=csl::ComplexProperty::Real)
 

Variables

csl::allocator< Constant > csl::alloc_constant
 
csl::allocator< Variable > csl::alloc_variable
 
const csl::Expr CSL_I = csl::make_shared<csl::Imaginary>()
 
const csl::Expr CSL_PI
 
const csl::Expr CSL_E
 
const csl::Expr CSL_INF
 Represents infinity in the program. More...
 
const csl::Expr CSL_UNDEF
 Constant that is useful in return of non-defined calculations as for example Commutator(): [A,B] returns CSL_UNDEF when it is not defined (more than AB-BA). It allows the program to avoid circular calculations and seg fault. More...
 

Detailed Description

Author
Grégoire Uhlrich
Version
1.3

Variable Documentation

◆ CSL_E

const csl::Expr CSL_E
inline
Initial value:
= csl::constant_s(
"e",
M_E,

◆ CSL_INF

const csl::Expr CSL_INF
inline
Initial value:
= csl::constant_s(
"INF",

Represents infinity in the program.

When an infinity appears in the abstract evaluation the program should return . is treated like a Variable. It is simply here to inform the user that *something bad happened** in the expr.

Bug:
Will not work for many cases, in particular log(0)!=. Not yet implemented.

◆ CSL_PI

const csl::Expr CSL_PI
inline
Initial value:
= csl::constant_s(
"\\pi",
M_PI,

◆ CSL_UNDEF

CSL_UNDEF
inline
Initial value:
= csl::constant_s(
"CSL_UNDEF",

Constant that is useful in return of non-defined calculations as for example Commutator(): [A,B] returns CSL_UNDEF when it is not defined (more than AB-BA). It allows the program to avoid circular calculations and seg fault.