GiNaC  1.6.2
Public Member Functions | Protected Member Functions | Private Attributes
GiNaC::minkmetric Class Reference

This class represents a Minkowski metric tensor. More...

#include <tensor.h>

Inheritance diagram for GiNaC::minkmetric:
GiNaC::tensmetric GiNaC::tensor GiNaC::basic GiNaC::refcounted

List of all members.

Public Member Functions

 minkmetric (bool pos_sig)
 Construct Lorentz metric tensor with given signature.
bool info (unsigned inf) const
 Information about the object.
ex eval_indexed (const basic &i) const
 Automatic symbolic evaluation of an indexed Lorentz metric tensor.
void archive (archive_node &n) const
 Save (a.k.a.
void read_archive (const archive_node &n, lst &syms)
 Read (a.k.a.

Protected Member Functions

unsigned return_type () const
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

Private Attributes

bool pos_sig
 If true, the metric is diag(-1,1,1...).

Detailed Description

This class represents a Minkowski metric tensor.

It has all the properties of a metric tensor and is (as a matrix) equal to diag(1,-1,-1,...) or diag(-1,1,1,...).

Definition at line 96 of file tensor.h.


Constructor & Destructor Documentation

GiNaC::minkmetric::minkmetric ( bool  pos_sig)

Construct Lorentz metric tensor with given signature.

Definition at line 75 of file tensor.cpp.


Member Function Documentation

bool GiNaC::minkmetric::info ( unsigned  inf) const [virtual]

Information about the object.

See also:
class info_flags

Reimplemented from GiNaC::tensmetric.

Definition at line 167 of file tensor.cpp.

References GiNaC::info_flags::real.

ex GiNaC::minkmetric::eval_indexed ( const basic i) const [virtual]

Automatic symbolic evaluation of an indexed Lorentz metric tensor.

Reimplemented from GiNaC::tensmetric.

Definition at line 284 of file tensor.cpp.

References GiNaC::_ex0, GiNaC::_ex1, GiNaC::_ex_1, GiNaC::idx::get_value(), GINAC_ASSERT, GiNaC::info_flags::nonnegint, GiNaC::basic::nops(), GiNaC::basic::op(), pos_sig, and GiNaC::to_int().

void GiNaC::minkmetric::archive ( archive_node n) const [virtual]

Save (a.k.a.

serialize) object into archive.

Reimplemented from GiNaC::basic.

Definition at line 106 of file tensor.cpp.

References GiNaC::archive_node::add_bool(), and pos_sig.

void GiNaC::minkmetric::read_archive ( const archive_node n,
lst syms 
) [virtual]

Read (a.k.a.

deserialize) object from archive.

Reimplemented from GiNaC::basic.

Definition at line 99 of file tensor.cpp.

References GiNaC::archive_node::find_bool(), and pos_sig.

unsigned GiNaC::minkmetric::return_type ( ) const [inline, protected, virtual]

Reimplemented from GiNaC::tensmetric.

Definition at line 116 of file tensor.h.

References GiNaC::return_types::commutative.

void GiNaC::minkmetric::do_print ( const print_context c,
unsigned  level 
) const [protected]

Default output to stream.

Reimplemented from GiNaC::tensmetric.

void GiNaC::minkmetric::do_print_latex ( const print_latex c,
unsigned  level 
) const [protected]

Member Data Documentation

If true, the metric is diag(-1,1,1...).

Otherwise it is diag(1,-1,-1,...).

Definition at line 122 of file tensor.h.

Referenced by archive(), eval_indexed(), and read_archive().


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.