•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sospin::Braket Class Reference Store expression... More...
|
Also checks for numeric deltas and evaluates them. This function also calls. More...
Private Attributes | |
vector< BraketOneTerm > | expression |
Store expressions with b's, b^ and delta's. More... | |
int | flag |
Flag to make the term numeration with ostream operator. More... | |
OPMode | operation |
Store type of operation: none, bra, ket or braket. More... | |
unsigned int | evaluated |
Store the evaluated state of the expression. More... | |
Friends | |
Braket | operator- (const Braket &L) |
overload operator for negate, -L More... | |
OPMode | operator* (const OPMode a, const OPMode b) |
calculate the mode for the multiplication More... | |
OPMode | operator+ (const OPMode a, const OPMode b) |
calculate the mode for the sum More... | |
OPMode | operator- (const OPMode a, const OPMode b) |
calculate the mode for the subtraction More... | |
ostream & | operator<< (ostream &out, const Braket &L) |
writes expression to ostream More... | |
string & | operator<< (string &out, const Braket &L) |
writes expression to string More... | |
string & | operator+ (string &out, const Braket &L) |
writes expression to string More... | |
sospin::Braket::Braket | ( | void | ) |
Constructor, default expression mode is none.
Definition at line 140 of file braket.cpp.
sospin::Braket::Braket | ( | const DList & | d0 | ) |
Constructor without constant part and index zero.
[in] | d0 | DList expression |
Definition at line 145 of file braket.cpp.
sospin::Braket::Braket | ( | int | id, |
string | a, | ||
DList | d0 | ||
) |
Constructor, default expression mode is none.
[in] | id | index of the expression |
[in] | a | constant part |
[in] | d0 | DList expression |
Definition at line 166 of file braket.cpp.
Constructor, default expression mode is none.
[in] | id | index of the expression |
[in] | a | constant part |
[in] | d0 | DList expression |
[in] | op | Braket type, i.e., bra/ket/braket/none |
Definition at line 173 of file braket.cpp.
sospin::Braket::Braket | ( | const Braket & | L | ) |
Constructor.
[in] | id | index of the expression |
[in] | a | constant part |
[in] | L | Braket expression, ignores current constant part of L |
[in] | op | Braket type, i.e., bra/ket/braket/none |
Definition at line 187 of file braket.cpp.
sospin::Braket::Braket | ( | BraketOneTerm | term | ) |
Constructor, default expression mode is none.
[in] | term | BraketOneTerm expression |
Definition at line 152 of file braket.cpp.
sospin::Braket::Braket | ( | BraketOneTerm | term, |
OPMode | op | ||
) |
Constructor.
[in] | term | BraketOneTerm expression |
[in] | op | Braket type, i.e., bra/ket/braket/none |
Definition at line 159 of file braket.cpp.
sospin::Braket::~Braket | ( | ) |
void sospin::Braket::checkDeltaIndex | ( | ) |
Checks indices in the deltas.
void sospin::Braket::checkindex | ( | ) |
Check global index in expression term if setSimplifyIndexSum()/FlagSimplifyGlobalIndexSum is active.
Definition at line 650 of file braket.cpp.
void sospin::Braket::clear | ( | ) |
Clear all allocated memory and sets default parameters.
Definition at line 212 of file braket.cpp.
void sospin::Braket::evaluate | ( | bool | onlydeltas = true | ) |
Evaluate expression.
[in] | onlydeltas | if true evaluate expression to deltas, if false evaluate expression to levi-civita |
Definition at line 1034 of file braket.cpp.
void sospin::Braket::expfromForm | ( | vector< string > | a | ) |
To pass a expression from form.
Definition at line 200 of file braket.cpp.
BraketOneTerm & sospin::Braket::Get | ( | int | pos | ) |
Return expression term at position given by pos.
Definition at line 240 of file braket.cpp.
int & sospin::Braket::GetIndex | ( | int | pos | ) |
Return/set the index sum of the term given by pos.
Definition at line 248 of file braket.cpp.
void sospin::Braket::gindexsetnull | ( | ) |
Sets to zero the indice sum of each expression term.
Definition at line 674 of file braket.cpp.
void sospin::Braket::mode | ( | ) |
Definition at line 330 of file braket.cpp.
overload operator for Braket * L
Definition at line 510 of file braket.cpp.
Braket sospin::Braket::operator* | ( | const string | constval | ) |
overload operator for Braket * constant part
Definition at line 469 of file braket.cpp.
overload operator for Braket *= L
Definition at line 534 of file braket.cpp.
Braket sospin::Braket::operator*= | ( | const string | constval | ) |
overload operator for Braket *= constant part
Definition at line 452 of file braket.cpp.
overload operator for Braket + L
Definition at line 432 of file braket.cpp.
overload operator for Braket += L
Definition at line 422 of file braket.cpp.
overload operator for Braket - L
Definition at line 406 of file braket.cpp.
overload operator for Braket -= L
Definition at line 394 of file braket.cpp.
overload operator for Braket = L
Definition at line 353 of file braket.cpp.
void sospin::Braket::rearrange | ( | ) |
Order nodes of DList in Braket.
First deltas and then b's and b\dagger's and remove the identity node when deltas, b or b^dagger is present
Definition at line 630 of file braket.cpp.
void sospin::Braket::setOFF | ( | ) |
Deactivate expression term numbering for output writing for each term "Local R?=".
Definition at line 229 of file braket.cpp.
void sospin::Braket::setON | ( | ) |
Activate expression term numbering for output writing for each term "Local R?=".
Definition at line 225 of file braket.cpp.
void sospin::Braket::simplify | ( | ) |
Simplify expression. Apply the following rules:
Also checks for numeric deltas and evaluates them. This function also calls.
Definition at line 728 of file braket.cpp.
int sospin::Braket::size | ( | ) |
Return number of terms in current expression.
Definition at line 237 of file braket.cpp.
OPMode & sospin::Braket::Type | ( | ) |
Definition at line 256 of file braket.cpp.
calculate the mode for the multiplication
a | mode of the left operand |
b | mode of the right operand |
Definition at line 317 of file braket.cpp.
calculate the mode for the sum
a | mode of the left operand |
b | mode of the right operand |
Definition at line 304 of file braket.cpp.
|
friend |
writes expression to string
Definition at line 617 of file braket.cpp.
overload operator for negate, -L
Definition at line 384 of file braket.cpp.
calculate the mode for the subtraction
a | mode of the left operand |
b | mode of the right operand |
Definition at line 291 of file braket.cpp.
|
friend |
writes expression to ostream
Definition at line 598 of file braket.cpp.
|
friend |
writes expression to string
Definition at line 612 of file braket.cpp.
|
private |
|
private |
|
private |
|
private |