GiNaC  1.6.2
Public Member Functions | Protected Member Functions | Protected Attributes
GiNaC::spinidx Class Reference

This class holds a spinor index that can be dotted or undotted and that also has a variance. More...

#include <idx.h>

Inheritance diagram for GiNaC::spinidx:
GiNaC::varidx GiNaC::idx GiNaC::basic GiNaC::refcounted

List of all members.

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

Detailed Description

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.

Definition at line 161 of file idx.h.


Constructor & Destructor Documentation

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.

Parameters:
vValue of index (numeric or symbolic)
dimDimension of index space (numeric or symbolic)
covariantMake covariant index (default is contravariant)
dottedMake covariant dotted (default is undotted)
Returns:
newly constructed index

Definition at line 64 of file idx.cpp.


Member Function Documentation

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]

Reimplemented from GiNaC::basic.

Definition at line 180 of file idx.h.

References toggle_dot().

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.

Note:
This method is essentially a constructor. However, constructors can't be virtual. So, if unarchiving routines are implemented as constructors one would need to define such a constructor in every class, even if all it does is simply calling constructor of a superclass.

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.

See also:
basic::match

Reimplemented from GiNaC::varidx.

Definition at line 334 of file idx.cpp.

References dotted, and GINAC_ASSERT.

bool GiNaC::spinidx::is_dotted ( ) const [inline]

Check whether the index is dotted.

Definition at line 189 of file idx.h.

References dotted.

bool GiNaC::spinidx::is_undotted ( ) const [inline]

Check whether the index is not dotted.

Definition at line 192 of file idx.h.

References dotted.

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]

Member Data Documentation

bool GiNaC::spinidx::dotted [protected]

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

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.