SOSpin is hosted by Hepforge, IPPP Durham
SOSpin  1.0.0

Store each term of the Braket class. More...

#include <include/braket.h>

Public Member Functions

 BraketOneTerm ()
 Constructor. More...
 
 BraketOneTerm (const DList &d0)
 Constructor without constant part and index zero. More...
 
 BraketOneTerm (int indexin, string constpartin, const DList &d0)
 Constructor. More...
 
 BraketOneTerm (int indexin, string constpartin, list< DList > termin)
 Constructor. More...
 
 BraketOneTerm (int indexin, string constpartin, BraketOneTerm &termin)
 Constructor. More...
 
 ~BraketOneTerm ()
 Destructor, clear all allocated memory. More...
 
void clear ()
 Clear all allocated memory and sets default parameters. More...
 
list< DList > & GetTerm ()
 Return (and set) the term part. More...
 
string & GetConst ()
 Return (and set) the constant part. More...
 
int & GetIndex ()
 Return (and set) the index sum part. More...
 
bool Simplify (OPMode operation)
 Simplify current expression term. More...
 
bool checkindex ()
 Check global index in expression term. More...
 
void expfromForm (string a)
 To pass a expression from form. More...
 
void rearrange ()
 Order nodes of DList in Braket. More...
 
bool isempty ()
 Returns true if expression is empty. More...
 
bool EvaluateToDeltas (OPMode oper)
 Evaluate the expression term to deltas. More...
 
bool EvaluateToLeviCivita (OPMode oper)
 Evaluate the expression term to levi-civita. More...
 
void neg ()
 Negate BraketOneTerm. More...
 
BraketOneTerm operator* (const string constval)
 overload operator for BraketOneTerm * constval More...
 
BraketOneTerm operator*= (const string constval)
 overload operator for BraketOneTerm *= constval More...
 
BraketOneTerm operator* (const BraketOneTerm &L)
 overload operator for BraketOneTerm * L More...
 
BraketOneTerm operator*= (const BraketOneTerm &L)
 overload operator for BraketOneTerm *= L More...
 

Private Member Functions

bool EvaluateEps_1stPass (OPMode oper)
 Reduce number of b's plus b's to 2N of SO(2N), and order all b's at left and all b's at right. More...
 
void EvaluateEps_2ndPass (OPMode oper)
 Convert current expression term to levi-civita and writes all in the string/constant part only if expression term is a braket. More...
 

Private Attributes

int index
 Store the index sum. More...
 
string constpart
 Store the constant part. More...
 
list< DListterm
 Store the part with b and b and/or delta or identity. More...
 

Friends

BraketOneTerm operator- (const BraketOneTerm &L)
 negate operator More...
 
ostream & operator<< (ostream &out, const BraketOneTerm &L)
 stream operator More...
 

Detailed Description

Store each term of the Braket class.

Definition at line 83 of file braket.h.

Constructor & Destructor Documentation

sospin::BraketOneTerm::BraketOneTerm ( )

Constructor.

Definition at line 73 of file braket.cpp.

sospin::BraketOneTerm::BraketOneTerm ( const DList d0)

Constructor without constant part and index zero.

Parameters
[in]d0DList expression

Definition at line 77 of file braket.cpp.

sospin::BraketOneTerm::BraketOneTerm ( int  indexin,
string  constpartin,
const DList d0 
)

Constructor.

Parameters
[in]indexinindex of the expression
[in]constpartinconstant part
[in]d0DList expression

Definition at line 82 of file braket.cpp.

sospin::BraketOneTerm::BraketOneTerm ( int  indexin,
string  constpartin,
list< DList termin 
)

Constructor.

Parameters
[in]indexinindex of the expression
[in]constpartinconstant part
[in]terminlist<DList> expression

Definition at line 88 of file braket.cpp.

sospin::BraketOneTerm::BraketOneTerm ( int  indexin,
string  constpartin,
BraketOneTerm termin 
)

Constructor.

Parameters
[in]indexinindex of the expression
[in]constpartinconstant part
[in]terminBraketOneTerm expression

Definition at line 94 of file braket.cpp.

sospin::BraketOneTerm::~BraketOneTerm ( )

Destructor, clear all allocated memory.

Definition at line 112 of file braket.cpp.

Member Function Documentation

bool sospin::BraketOneTerm::checkindex ( )

Check global index in expression term.

Returns
true if |index| is equal to 0 or N of SO(2N), otherwise returns false

Definition at line 646 of file braket.cpp.

void sospin::BraketOneTerm::clear ( )

Clear all allocated memory and sets default parameters.

Definition at line 107 of file braket.cpp.

bool sospin::BraketOneTerm::EvaluateEps_1stPass ( OPMode  oper)
private

Reduce number of b's plus b's to 2N of SO(2N), and order all b's at left and all b's at right.

Parameters
[in]operOPMode of current expression (none, bra, ket, braket)
Returns
true if expression is zero/empty and false otherwise

Definition at line 953 of file braket.cpp.

void sospin::BraketOneTerm::EvaluateEps_2ndPass ( OPMode  oper)
private

Convert current expression term to levi-civita and writes all in the string/constant part only if expression term is a braket.

Parameters
operexpression type, OPMode

Definition at line 798 of file braket.cpp.

bool sospin::BraketOneTerm::EvaluateToDeltas ( OPMode  oper)

Evaluate the expression term to deltas.

Parameters
[in]operterm mode (bra, braket, ket or none)
Returns
true if term is empty or gives zero, otherwise returns false

Definition at line 979 of file braket.cpp.

bool sospin::BraketOneTerm::EvaluateToLeviCivita ( OPMode  oper)

Evaluate the expression term to levi-civita.

Parameters
[in]operterm mode (bra, braket, ket or none)
Returns
true if term is empty or gives zero, otherwise returns false

Definition at line 966 of file braket.cpp.

void sospin::BraketOneTerm::expfromForm ( string  a)

To pass a expression from form.

Definition at line 103 of file braket.cpp.

string & sospin::BraketOneTerm::GetConst ( )

Return (and set) the constant part.

Definition at line 116 of file braket.cpp.

int & sospin::BraketOneTerm::GetIndex ( )

Return (and set) the index sum part.

Definition at line 117 of file braket.cpp.

list< DList > & sospin::BraketOneTerm::GetTerm ( )

Return (and set) the term part.

Definition at line 115 of file braket.cpp.

bool sospin::BraketOneTerm::isempty ( )

Returns true if expression is empty.

Definition at line 118 of file braket.cpp.

void sospin::BraketOneTerm::neg ( )

Negate BraketOneTerm.

Definition at line 375 of file braket.cpp.

BraketOneTerm sospin::BraketOneTerm::operator* ( const string  constval)

overload operator for BraketOneTerm * constval

Definition at line 461 of file braket.cpp.

BraketOneTerm sospin::BraketOneTerm::operator* ( const BraketOneTerm L)

overload operator for BraketOneTerm * L

Definition at line 483 of file braket.cpp.

BraketOneTerm sospin::BraketOneTerm::operator*= ( const string  constval)

overload operator for BraketOneTerm *= constval

Definition at line 447 of file braket.cpp.

BraketOneTerm sospin::BraketOneTerm::operator*= ( const BraketOneTerm L)

overload operator for BraketOneTerm *= L

void sospin::BraketOneTerm::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 625 of file braket.cpp.

bool sospin::BraketOneTerm::Simplify ( OPMode  operation)

Simplify current expression term.

Parameters
[in]operterm mode (bra, braket, ket or none)
Returns
true if expression term is empty, false otherwise

Definition at line 687 of file braket.cpp.

Friends And Related Function Documentation

BraketOneTerm operator- ( const BraketOneTerm L)
friend

negate operator

Definition at line 365 of file braket.cpp.

ostream& operator<< ( ostream &  out,
const BraketOneTerm L 
)
friend

stream operator

Definition at line 561 of file braket.cpp.

Member Data Documentation

string sospin::BraketOneTerm::constpart
private

Store the constant part.

Definition at line 88 of file braket.h.

int sospin::BraketOneTerm::index
private

Store the index sum.

Definition at line 86 of file braket.h.

list<DList> sospin::BraketOneTerm::term
private

Store the part with b and b and/or delta or identity.

Definition at line 90 of file braket.h.


The documentation for this class was generated from the following files: