23 #ifndef COMMUTATION_H_INCLUDED 24 #define COMMUTATION_H_INCLUDED 43 Expr
Commutation(
const Expr& A,
const Expr& B,
int sign=-1);
45 Expr
Commutation(Expr_info A, Expr_info B,
int sign=-1);
111 void print(
int mode=0,
112 std::ostream& out=std::cout,
113 bool lib =
false)
const override;
115 std::string
printLaTeX(
int mode=0)
const override;
120 csl::eval::mode user_mode = csl::eval::base
123 unique_Expr copy_unique()
const override;
125 Expr deepCopy()
const override;
127 Expr refresh()
const override;
129 Expr deepRefresh()
const override;
137 bool operator<(
const Abstract* expr)
const override;
Expr commutator_(const Expr &A, const Expr &B, int t_sign=-1)
Tries to create a Commutator object of A and B of sign sign.
Definition: commutation.cpp:249
Namespace for csl library.
Definition: abreviation.h:34
int sign
Sign of the commutator. +1 for anti-commutator, -1 for commutator.
Definition: commutation.h:77
Handle functions of multiple arguments. In the case of the call of a simplification function...
Definition: scalarFunc.h:199
~Commutator()
Destructor.
Definition: commutation.h:99
std::optional< Expr > derive(Expr_info expr) const override
Calculates the derivative of the Abstract wrt another.
Definition: commutation.cpp:219
Type
Enum of the different types of Abstract (i.e. list of all possible specializations).
Definition: enum.h:47
Commutator()
Default constructor.
Definition: commutation.cpp:100
csl::Type getType() const override
Gives the type of a Commutator object.
Definition: commutation.cpp:113
Expr WeakCommutation(const Expr &A, const Expr &B, int sign=-1)
Returns the result of the (anit-)commutation of A and B. In most cases it returns CSL_0...
Definition: commutation.cpp:60
long double evaluateScalar() const override
Evaluates the value of the Abstract.
Definition: commutation.cpp:168
Root class of the inheritance tree of abstracts.
Definition: abstract.h:76
Base classes for scalar functions.
std::optional< Expr > evaluate(csl::eval::mode user_mode=csl::eval::base) const override
Evaluates the Abstract.
Definition: commutation.cpp:178
int getParity(Expr_info t_variable) const override
Returns the parity property of the expression with respect to t_variable.
Definition: commutation.cpp:225
Object that represents a commutator or an anti-commutator, thus is derived from AbstractDuoFunc that ...
Definition: commutation.h:70
std::string printLaTeX(int mode=0) const override
Creates a LaTeX output for the Abstract.
Definition: commutation.cpp:148
int getSign() const override
Definition: commutation.cpp:118
bool operator==(Expr_info expr) const override
Compares the Abstract with another.
Definition: commutation.cpp:233
Expr Commutation(const Expr &A, const Expr &B, int sign=-1)
Returns the result of the (anit-)commutation of A and B. In most cases it returns CSL_0...
Definition: commutation.cpp:27
void print(int mode=0, std::ostream &out=std::cout, bool lib=false) const override
Displays the abstract in standard output.
Definition: commutation.cpp:123
Expression type/.
Definition: abstract.h:1573