|
GiNaC
1.6.2
|
This class holds an object representing an element of the Clifford algebra (the Dirac gamma matrices). More...
#include <clifford.h>
Public Member Functions | |
| clifford (const ex &b, unsigned char rl=0) | |
| Construct object without any indices. | |
| clifford (const ex &b, const ex &mu, const ex &metr, unsigned char rl=0, int comm_sign=-1) | |
| Construct object with one Lorentz index. | |
| clifford (unsigned char rl, const ex &metr, int comm_sign, const exvector &v, bool discardable=false) | |
| clifford (unsigned char rl, const ex &metr, int comm_sign, std::auto_ptr< exvector > vp) | |
| unsigned | precedence () const |
| Return relative operator precedence (for parenthezing output). | |
| void | archive (archive_node &n) const |
| Save (a.k.a. | |
| void | read_archive (const archive_node &n, lst &sym_lst) |
| Read (a.k.a. | |
| unsigned char | get_representation_label () const |
| ex | get_metric () const |
| virtual ex | get_metric (const ex &i, const ex &j, bool symmetrised=false) const |
| bool | same_metric (const ex &other) const |
| int | get_commutator_sign () const |
| size_t | nops () const |
| Number of operands/members. | |
| ex | op (size_t i) const |
| Return operand/member at position i. | |
| ex & | let_op (size_t i) |
| Return modifyable operand/member at position i. | |
| ex | subs (const exmap &m, unsigned options=0) const |
| Substitute a set of objects by arbitrary expressions. | |
Protected Member Functions | |
| ex | eval_ncmul (const exvector &v) const |
| Perform automatic simplification on noncommutative product of clifford objects. | |
| bool | match_same_type (const basic &other) const |
| Returns true if the attributes of two objects are similar enough for a match. | |
| ex | thiscontainer (const exvector &v) const |
| ex | thiscontainer (std::auto_ptr< exvector > vp) const |
| unsigned | return_type () const |
| return_type_t | return_type_tinfo () const |
| void | do_print_dflt (const print_dflt &c, unsigned level) const |
| void | do_print_latex (const print_latex &c, unsigned level) const |
Protected Attributes | |
| unsigned char | representation_label |
| Representation label to distinguish independent spin lines. | |
| ex | metric |
| Metric of the space, all constructors make it an indexed object. | |
| int | commutator_sign |
| It is the sign in the definition e~i e~j +/- e~j e~i = B(i, j) + B(j, i) | |
This class holds an object representing an element of the Clifford algebra (the Dirac gamma matrices).
These objects only carry Lorentz indices. Spinor indices are hidden. A representation label (an unsigned 8-bit integer) is used to distinguish elements from different Clifford algebras (objects with different labels commutate).
Definition at line 40 of file clifford.h.
| GiNaC::clifford::clifford | ( | const ex & | b, |
| unsigned char | rl = 0 |
||
| ) |
Construct object without any indices.
This constructor is for internal use only. Use the dirac_ONE() function instead.
Definition at line 95 of file clifford.cpp.
| GiNaC::clifford::clifford | ( | const ex & | b, |
| const ex & | mu, | ||
| const ex & | metr, | ||
| unsigned char | rl = 0, |
||
| int | comm_sign = -1 |
||
| ) |
Construct object with one Lorentz index.
This constructor is for internal use only. Use the clifford_unit() or dirac_gamma() functions instead.
Definition at line 103 of file clifford.cpp.
References GINAC_ASSERT.
| GiNaC::clifford::clifford | ( | unsigned char | rl, |
| const ex & | metr, | ||
| int | comm_sign, | ||
| const exvector & | v, | ||
| bool | discardable = false |
||
| ) |
Definition at line 108 of file clifford.cpp.
| GiNaC::clifford::clifford | ( | unsigned char | rl, |
| const ex & | metr, | ||
| int | comm_sign, | ||
| std::auto_ptr< exvector > | vp | ||
| ) |
Definition at line 112 of file clifford.cpp.
| unsigned GiNaC::clifford::precedence | ( | ) | const [inline, virtual] |
Return relative operator precedence (for parenthezing output).
Reimplemented from GiNaC::indexed.
Definition at line 54 of file clifford.h.
Referenced by do_print_dflt(), and do_print_latex().
| void GiNaC::clifford::archive | ( | archive_node & | n | ) | const [virtual] |
Save (a.k.a.
serialize) indexed object into archive.
Reimplemented from GiNaC::indexed.
Definition at line 136 of file clifford.cpp.
References GiNaC::archive_node::add_ex(), GiNaC::archive_node::add_unsigned(), commutator_sign, metric, and representation_label.
| void GiNaC::clifford::read_archive | ( | const archive_node & | n, |
| lst & | syms | ||
| ) | [virtual] |
Read (a.k.a.
deserialize) indexed object from archive.
Reimplemented from GiNaC::indexed.
Definition at line 125 of file clifford.cpp.
References commutator_sign, GiNaC::archive_node::find_ex(), GiNaC::archive_node::find_unsigned(), metric, and representation_label.
Perform automatic simplification on noncommutative product of clifford objects.
This removes superfluous ONEs, permutes gamma5/L/R's to the front and removes squares of gamma objects.
Reimplemented from GiNaC::basic.
Definition at line 516 of file clifford.cpp.
| bool GiNaC::clifford::match_same_type | ( | const basic & | other | ) | const [protected, virtual] |
Returns true if the attributes of two objects are similar enough for a match.
This function must not match subexpressions (this is already done by basic::match()). Only attributes not accessible by op() should be compared. This is also the reason why this function doesn't take the wildcard replacement list from match() as an argument: only subexpressions are subject to wildcard matches. Also, this function only needs to be implemented for container classes because is_equal_same_type() is automatically used instead of match_same_type() if nops() == 0.
Reimplemented from GiNaC::basic.
Definition at line 245 of file clifford.cpp.
References commutator_sign, get_commutator_sign(), GINAC_ASSERT, representation_label, and same_metric().
Reimplemented from GiNaC::indexed.
Definition at line 682 of file clifford.cpp.
Reimplemented from GiNaC::indexed.
Definition at line 687 of file clifford.cpp.
| unsigned GiNaC::clifford::return_type | ( | ) | const [inline, protected, virtual] |
Reimplemented from GiNaC::indexed.
Definition at line 62 of file clifford.h.
References GiNaC::return_types::noncommutative.
| return_type_t GiNaC::clifford::return_type_tinfo | ( | ) | const [protected, virtual] |
Reimplemented from GiNaC::indexed.
Definition at line 116 of file clifford.cpp.
References representation_label.
| unsigned char GiNaC::clifford::get_representation_label | ( | ) | const [inline] |
Definition at line 66 of file clifford.h.
References representation_label.
| ex GiNaC::clifford::get_metric | ( | ) | const [inline] |
| ex GiNaC::clifford::get_metric | ( | const ex & | i, |
| const ex & | j, | ||
| bool | symmetrised = false |
||
| ) | const [virtual] |
Definition at line 152 of file clifford.cpp.
References GiNaC::_ex1_2, GiNaC::ex::get_free_indices(), GiNaC::indexed::get_symmetry(), GiNaC::indexed::indexed(), metric, GiNaC::subs_options::no_pattern, GiNaC::ex::op(), GiNaC::indexed::simplify_indexed, GiNaC::ex::subs(), GiNaC::symmetric2(), and GiNaC::transpose().
| bool GiNaC::clifford::same_metric | ( | const ex & | other | ) | const |
Definition at line 175 of file clifford.cpp.
References GiNaC::ex::get_free_indices(), get_metric(), GiNaC::ex::is_equal(), GiNaC::is_zero(), op(), GiNaC::ex::op(), and GiNaC::indexed::simplify_indexed.
Referenced by match_same_type().
| int GiNaC::clifford::get_commutator_sign | ( | ) | const [inline] |
Definition at line 70 of file clifford.h.
References commutator_sign.
Referenced by match_same_type().
| size_t GiNaC::clifford::nops | ( | ) | const [inline, virtual] |
Number of operands/members.
Reimplemented from GiNaC::container< C >.
Definition at line 72 of file clifford.h.
| ex GiNaC::clifford::op | ( | size_t | i | ) | const [virtual] |
Return operand/member at position i.
Reimplemented from GiNaC::container< C >.
Definition at line 196 of file clifford.cpp.
References GINAC_ASSERT, nops(), and representation_label.
Referenced by same_metric().
| ex & GiNaC::clifford::let_op | ( | size_t | i | ) | [virtual] |
Return modifyable operand/member at position i.
Reimplemented from GiNaC::container< C >.
Definition at line 205 of file clifford.cpp.
References GiNaC::basic::ensure_if_modifiable(), GINAC_ASSERT, nops(), and representation_label.
Substitute a set of objects by arbitrary expressions.
The ex returned will already be evaluated.
Reimplemented from GiNaC::container< C >.
Definition at line 217 of file clifford.cpp.
References GiNaC::are_ex_trivially_equal(), c, metric, and GiNaC::ex::subs().
| void GiNaC::clifford::do_print_dflt | ( | const print_dflt & | c, |
| unsigned | level | ||
| ) | const [protected] |
Definition at line 260 of file clifford.cpp.
References c, GiNaC::is_dirac_slash(), precedence(), GiNaC::indexed::printindices(), representation_label, GiNaC::print_context::s, and GiNaC::container_storage< C >::seq.
| void GiNaC::clifford::do_print_latex | ( | const print_latex & | c, |
| unsigned | level | ||
| ) | const [protected] |
Reimplemented from GiNaC::indexed.
Definition at line 283 of file clifford.cpp.
References c, GiNaC::is_dirac_slash(), precedence(), representation_label, GiNaC::print_context::s, and GiNaC::container_storage< C >::seq.
unsigned char GiNaC::clifford::representation_label [protected] |
Representation label to distinguish independent spin lines.
Definition at line 83 of file clifford.h.
Referenced by archive(), do_print_dflt(), do_print_latex(), get_representation_label(), let_op(), match_same_type(), op(), read_archive(), and return_type_tinfo().
ex GiNaC::clifford::metric [protected] |
Metric of the space, all constructors make it an indexed object.
Definition at line 84 of file clifford.h.
Referenced by archive(), get_metric(), read_archive(), and subs().
int GiNaC::clifford::commutator_sign [protected] |
It is the sign in the definition e~i e~j +/- e~j e~i = B(i, j) + B(j, i)
Definition at line 85 of file clifford.h.
Referenced by archive(), get_commutator_sign(), match_same_type(), and read_archive().