|
GiNaC
1.6.2
|
This class holds a spinor index that can be dotted or undotted and that also has a variance. More...
#include <idx.h>
Public Member Functions | |
| spinidx (const ex &v, const ex &dim=2, bool covariant=false, bool dotted=false) | |
| Construct index with given value, dimension, variance and dot. | |
| bool | is_dummy_pair_same_type (const basic &other) const |
| Check whether the index forms a dummy index pair with another index of the same type. | |
| ex | conjugate () const |
| void | archive (archive_node &n) const |
| Save (serialize) the object into archive node. | |
| void | read_archive (const archive_node &n, lst &syms) |
| Load (deserialize) the object from an archive node. | |
| bool | is_dotted () const |
| Check whether the index is dotted. | |
| bool | is_undotted () const |
| Check whether the index is not dotted. | |
| ex | toggle_dot () const |
| Make a new index with the same value and variance but the opposite dottedness. | |
| ex | toggle_variance_dot () const |
| Make a new index with the same value but opposite variance and dottedness. | |
Protected Member Functions | |
| bool | match_same_type (const basic &other) const |
| Returns true if the attributes of two objects are similar enough for a match. | |
| void | do_print (const print_context &c, unsigned level) const |
| Default output to stream. | |
| void | do_print_latex (const print_latex &c, unsigned level) const |
| void | do_print_tree (const print_tree &c, unsigned level) const |
| Tree output to stream. | |
Protected Attributes | |
| bool | dotted |
This class holds a spinor index that can be dotted or undotted and that also has a variance.
This is used in the Weyl-van-der-Waerden formalism where the dot indicates complex conjugation. There is an associated (asymmetric) metric tensor that can be used to raise/lower spinor indices.
| GiNaC::spinidx::spinidx | ( | const ex & | v, |
| const ex & | dim = 2, |
||
| bool | covariant = false, |
||
| bool | dotted = false |
||
| ) |
Construct index with given value, dimension, variance and dot.
| v | Value of index (numeric or symbolic) |
| dim | Dimension of index space (numeric or symbolic) |
| covariant | Make covariant index (default is contravariant) |
| dotted | Make covariant dotted (default is undotted) |
| bool GiNaC::spinidx::is_dummy_pair_same_type | ( | const basic & | other | ) | const [virtual] |
Check whether the index forms a dummy index pair with another index of the same type.
Reimplemented from GiNaC::varidx.
Definition at line 445 of file idx.cpp.
References dotted.
| ex GiNaC::spinidx::conjugate | ( | ) | const [inline, virtual] |
| void GiNaC::spinidx::archive | ( | archive_node & | n | ) | const [virtual] |
Save (serialize) the object into archive node.
Archive the object.
Losely speaking, this method turns an expression into a byte stream (which can be saved and restored later on, or sent via network, etc.)
Reimplemented from GiNaC::varidx.
Definition at line 126 of file idx.cpp.
References GiNaC::archive_node::add_bool(), and dotted.
| void GiNaC::spinidx::read_archive | ( | const archive_node & | n, |
| lst & | syms | ||
| ) | [virtual] |
Load (deserialize) the object from an archive node.
Construct object from archive_node.
Reimplemented from GiNaC::varidx.
Definition at line 106 of file idx.cpp.
References dotted, and GiNaC::archive_node::find_bool().
| bool GiNaC::spinidx::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::varidx.
Definition at line 334 of file idx.cpp.
References dotted, and GINAC_ASSERT.
| bool GiNaC::spinidx::is_dotted | ( | ) | const [inline] |
| bool GiNaC::spinidx::is_undotted | ( | ) | const [inline] |
| ex GiNaC::spinidx::toggle_dot | ( | ) | const |
Make a new index with the same value and variance but the opposite dottedness.
Definition at line 482 of file idx.cpp.
References GiNaC::basic::clearflag(), dotted, GiNaC::basic::duplicate(), GiNaC::status_flags::dynallocated, GiNaC::status_flags::hash_calculated, and GiNaC::basic::setflag().
Referenced by conjugate().
| ex GiNaC::spinidx::toggle_variance_dot | ( | ) | const |
Make a new index with the same value but opposite variance and dottedness.
Definition at line 490 of file idx.cpp.
References GiNaC::basic::clearflag(), GiNaC::varidx::covariant, dotted, GiNaC::basic::duplicate(), GiNaC::status_flags::dynallocated, GiNaC::status_flags::hash_calculated, and GiNaC::basic::setflag().
| void GiNaC::spinidx::do_print | ( | const print_context & | c, |
| unsigned | level | ||
| ) | const [protected] |
Default output to stream.
Reimplemented from GiNaC::varidx.
Definition at line 202 of file idx.cpp.
References GiNaC::varidx::covariant, dotted, GiNaC::idx::print_index(), and GiNaC::print_context::s.
| void GiNaC::spinidx::do_print_latex | ( | const print_latex & | c, |
| unsigned | level | ||
| ) | const [protected] |
Reimplemented from GiNaC::idx.
Definition at line 213 of file idx.cpp.
References dotted, GiNaC::idx::print_index(), and GiNaC::print_context::s.
| void GiNaC::spinidx::do_print_tree | ( | const print_tree & | c, |
| unsigned | level | ||
| ) | const [protected] |
Tree output to stream.
Reimplemented from GiNaC::varidx.
Definition at line 223 of file idx.cpp.
References GiNaC::varidx::covariant, GiNaC::print_tree::delta_indent, GiNaC::idx::dim, dotted, GiNaC::basic::flags, GiNaC::basic::hashvalue, GiNaC::ex::print(), GiNaC::print_context::s, and GiNaC::idx::value.
bool GiNaC::spinidx::dotted [protected] |
Definition at line 209 of file idx.h.
Referenced by archive(), do_print(), do_print_latex(), do_print_tree(), is_dotted(), is_dummy_pair_same_type(), is_undotted(), match_same_type(), read_archive(), toggle_dot(), and toggle_variance_dot().