GiNaC 1.8.7
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
GiNaC::indexed Class Reference

This class holds an indexed expression. More...

#include <indexed.h>

Inheritance diagram for GiNaC::indexed:
GiNaC::container< C > GiNaC::basic GiNaC::container_storage< C > GiNaC::refcounted GiNaC::clifford GiNaC::color

Public Member Functions

 indexed (const ex &b)
 Construct indexed object with no index. More...
 
 indexed (const ex &b, const ex &i1)
 Construct indexed object with one index. More...
 
 indexed (const ex &b, const ex &i1, const ex &i2)
 Construct indexed object with two indices. More...
 
 indexed (const ex &b, const ex &i1, const ex &i2, const ex &i3)
 Construct indexed object with three indices. More...
 
 indexed (const ex &b, const ex &i1, const ex &i2, const ex &i3, const ex &i4)
 Construct indexed object with four indices. More...
 
 indexed (const ex &b, const symmetry &symm, const ex &i1, const ex &i2)
 Construct indexed object with two indices and a specified symmetry. More...
 
 indexed (const ex &b, const symmetry &symm, const ex &i1, const ex &i2, const ex &i3)
 Construct indexed object with three indices and a specified symmetry. More...
 
 indexed (const ex &b, const symmetry &symm, const ex &i1, const ex &i2, const ex &i3, const ex &i4)
 Construct indexed object with four indices and a specified symmetry. More...
 
 indexed (const ex &b, const exvector &iv)
 Construct indexed object with a specified vector of indices. More...
 
 indexed (const ex &b, const symmetry &symm, const exvector &iv)
 Construct indexed object with a specified vector of indices and symmetry. More...
 
 indexed (const symmetry &symm, const exprseq &es)
 
 indexed (const symmetry &symm, const exvector &v)
 
 indexed (const symmetry &symm, exvector &&v)
 
unsigned precedence () const override
 Return relative operator precedence (for parenthezing output). More...
 
bool info (unsigned inf) const override
 Information about the object. More...
 
ex eval () const override
 Perform automatic non-interruptive term rewriting rules. More...
 
ex real_part () const override
 
ex imag_part () const override
 
exvector get_free_indices () const override
 Return a vector containing the free indices of an expression. More...
 
void archive (archive_node &n) const override
 Save (a.k.a. More...
 
void read_archive (const archive_node &n, lst &syms) override
 Read (a.k.a. More...
 
bool all_index_values_are (unsigned inf) const
 Check whether all index values have a certain property. More...
 
exvector get_indices () const
 Return a vector containing the object's indices. More...
 
exvector get_dummy_indices () const
 Return a vector containing the dummy indices of the object, if any. More...
 
exvector get_dummy_indices (const indexed &other) const
 Return a vector containing the dummy indices in the contraction with another indexed object. More...
 
bool has_dummy_index_for (const ex &i) const
 Check whether the object has an index that forms a dummy index pair with a given index. More...
 
ex get_symmetry () const
 Return symmetry properties. More...
 
- Public Member Functions inherited from GiNaC::container< C >
 container (STLT const &s)
 
 container (STLT &&v)
 
 container (exvector::const_iterator b, exvector::const_iterator e)
 
 container (std::initializer_list< ex > il)
 
bool info (unsigned inf) const override
 Information about the object. More...
 
unsigned precedence () const override
 Return relative operator precedence (for parenthezing output). More...
 
size_t nops () const override
 Number of operands/members. More...
 
ex op (size_t i) const override
 Return operand/member at position i. More...
 
exlet_op (size_t i) override
 Return modifiable operand/member at position i. More...
 
ex subs (const exmap &m, unsigned options=0) const override
 Substitute a set of objects by arbitrary expressions. More...
 
void read_archive (const archive_node &n, lst &sym_lst) override
 Load (deserialize) the object from an archive node. More...
 
void archive (archive_node &n) const override
 Archive the object. More...
 
containerprepend (const ex &b)
 Add element at front. More...
 
containerappend (const ex &b)
 Add element at back. More...
 
containerremove_first ()
 Remove first element. More...
 
containerremove_last ()
 Remove last element. More...
 
containerremove_all ()
 Remove all elements. More...
 
containersort ()
 Sort elements. More...
 
containerunique ()
 Remove adjacent duplicate elements. More...
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
- Public Member Functions inherited from GiNaC::basic
virtual ~basic ()
 basic destructor, virtual because class ex will delete objects of derived classes via a basic*. More...
 
 basic (const basic &other)
 
const basicoperator= (const basic &other)
 basic assignment operator: the other object might be of a derived class. More...
 
virtual basicduplicate () const
 Create a clone of this object on the heap. More...
 
virtual ex eval () const
 Perform automatic non-interruptive term rewriting rules. More...
 
virtual ex evalf () const
 Evaluate object numerically. More...
 
virtual ex evalm () const
 Evaluate sums, products and integer powers of matrices. More...
 
virtual ex eval_integ () const
 Evaluate integrals, if result is known. More...
 
virtual ex eval_indexed (const basic &i) const
 Perform automatic symbolic evaluations on indexed expression that contains this object as the base expression. More...
 
virtual void print (const print_context &c, unsigned level=0) const
 Output to stream. More...
 
virtual void dbgprint () const
 Little wrapper around print to be called within a debugger. More...
 
virtual void dbgprinttree () const
 Little wrapper around printtree to be called within a debugger. More...
 
virtual unsigned precedence () const
 Return relative operator precedence (for parenthezing output). More...
 
virtual bool info (unsigned inf) const
 Information about the object. More...
 
virtual size_t nops () const
 Number of operands/members. More...
 
virtual ex op (size_t i) const
 Return operand/member at position i. More...
 
virtual ex operator[] (const ex &index) const
 
virtual ex operator[] (size_t i) const
 
virtual exlet_op (size_t i)
 Return modifiable operand/member at position i. More...
 
virtual exoperator[] (const ex &index)
 
virtual exoperator[] (size_t i)
 
virtual bool has (const ex &other, unsigned options=0) const
 Test for occurrence of a pattern. More...
 
virtual bool match (const ex &pattern, exmap &repls) const
 Check whether the expression matches a given pattern. More...
 
virtual ex subs (const exmap &m, unsigned options=0) const
 Substitute a set of objects by arbitrary expressions. More...
 
virtual ex map (map_function &f) const
 Construct new expression by applying the specified function to all sub-expressions (one level only, not recursively). More...
 
virtual void accept (GiNaC::visitor &v) const
 
virtual bool is_polynomial (const ex &var) const
 Check whether this is a polynomial in the given variables. More...
 
virtual int degree (const ex &s) const
 Return degree of highest power in object s. More...
 
virtual int ldegree (const ex &s) const
 Return degree of lowest power in object s. More...
 
virtual ex coeff (const ex &s, int n=1) const
 Return coefficient of degree n in object s. More...
 
virtual ex expand (unsigned options=0) const
 Expand expression, i.e. More...
 
virtual ex collect (const ex &s, bool distributed=false) const
 Sort expanded expression in terms of powers of some object(s). More...
 
virtual ex series (const relational &r, int order, unsigned options=0) const
 Default implementation of ex::series(). More...
 
virtual ex normal (exmap &repl, exmap &rev_lookup, lst &modifier) const
 Default implementation of ex::normal(). More...
 
virtual ex to_rational (exmap &repl) const
 Default implementation of ex::to_rational(). More...
 
virtual ex to_polynomial (exmap &repl) const
 
virtual numeric integer_content () const
 
virtual ex smod (const numeric &xi) const
 Apply symmetric modular homomorphism to an expanded multivariate polynomial. More...
 
virtual numeric max_coefficient () const
 Implementation ex::max_coefficient(). More...
 
virtual exvector get_free_indices () const
 Return a vector containing the free indices of an expression. More...
 
virtual ex add_indexed (const ex &self, const ex &other) const
 Add two indexed expressions. More...
 
virtual ex scalar_mul_indexed (const ex &self, const numeric &other) const
 Multiply an indexed expression with a scalar. More...
 
virtual bool contract_with (exvector::iterator self, exvector::iterator other, exvector &v) const
 Try to contract two indexed expressions that appear in the same product. More...
 
virtual unsigned return_type () const
 
virtual return_type_t return_type_tinfo () const
 
virtual ex conjugate () const
 
virtual ex real_part () const
 
virtual ex imag_part () const
 
template<class T >
void print_dispatch (const print_context &c, unsigned level) const
 Like print(), but dispatch to the specified class. More...
 
void print_dispatch (const registered_class_info &ri, const print_context &c, unsigned level) const
 Like print(), but dispatch to the specified class. More...
 
virtual void archive (archive_node &n) const
 Save (serialize) the object into archive node. More...
 
virtual void read_archive (const archive_node &n, lst &syms)
 Load (deserialize) the object from an archive node. More...
 
ex subs_one_level (const exmap &m, unsigned options) const
 Helper function for subs(). More...
 
ex diff (const symbol &s, unsigned nth=1) const
 Default interface of nth derivative ex::diff(s, n). More...
 
int compare (const basic &other) const
 Compare objects syntactically to establish canonical ordering. More...
 
bool is_equal (const basic &other) const
 Test for syntactic equality. More...
 
const basichold () const
 Stop further evaluation. More...
 
unsigned gethash () const
 
const basicsetflag (unsigned f) const
 Set some status_flags. More...
 
const basicclearflag (unsigned f) const
 Clear some status_flags. More...
 
- Public Member Functions inherited from GiNaC::refcounted
 refcounted () noexcept
 
unsigned int add_reference () noexcept
 
unsigned int remove_reference () noexcept
 
unsigned int get_refcount () const noexcept
 
void set_refcount (unsigned int r) noexcept
 

Protected Member Functions

ex derivative (const symbol &s) const override
 Implementation of ex::diff() for an indexed object always returns 0. More...
 
ex thiscontainer (const exvector &v) const override
 
ex thiscontainer (exvector &&v) const override
 
unsigned return_type () const override
 
return_type_t return_type_tinfo () const override
 
ex expand (unsigned options=0) const override
 Expand expression, i.e. More...
 
void printindices (const print_context &c, unsigned level) const
 
void print_indexed (const print_context &c, const char *openbrace, const char *closebrace, unsigned level) const
 
void do_print (const print_context &c, unsigned level) const
 
void do_print_latex (const print_latex &c, unsigned level) const
 
void do_print_tree (const print_tree &c, unsigned level) const
 
void validate () const
 Check whether all indices are of class idx and validate the symmetry tree. More...
 
- Protected Member Functions inherited from GiNaC::container< C >
ex conjugate () const override
 
ex real_part () const override
 
ex imag_part () const override
 
bool is_equal_same_type (const basic &other) const override
 Returns true if two objects of same type are equal. More...
 
virtual ex thiscontainer (const STLT &v) const
 Similar to duplicate(), but with a preset sequence. More...
 
virtual ex thiscontainer (STLT &&v) const
 Similar to duplicate(), but with a preset sequence (which gets pilfered). More...
 
virtual void printseq (const print_context &c, char openbracket, char delim, char closebracket, unsigned this_precedence, unsigned upper_precedence=0) const
 Print sequence of contained elements. More...
 
void do_print (const print_context &c, unsigned level) const
 
void do_print_tree (const print_tree &c, unsigned level) const
 
void do_print_python (const print_python &c, unsigned level) const
 
void do_print_python_repr (const print_python_repr &c, unsigned level) const
 
STLT subschildren (const exmap &m, unsigned options=0) const
 
- Protected Member Functions inherited from GiNaC::basic
 basic ()
 
virtual ex eval_ncmul (const exvector &v) const
 
virtual bool match_same_type (const basic &other) const
 Returns true if the attributes of two objects are similar enough for a match. More...
 
virtual ex derivative (const symbol &s) const
 Default implementation of ex::diff(). More...
 
virtual int compare_same_type (const basic &other) const
 Returns order relation between two objects of same type. More...
 
virtual bool is_equal_same_type (const basic &other) const
 Returns true if two objects of same type are equal. More...
 
virtual unsigned calchash () const
 Compute the hash value of an object and if it makes sense to store it in the objects status_flags, do so. More...
 
void ensure_if_modifiable () const
 Ensure the object may be modified without hurting others, throws if this is not the case. More...
 
void do_print (const print_context &c, unsigned level) const
 Default output to stream. More...
 
void do_print_tree (const print_tree &c, unsigned level) const
 Tree output to stream. More...
 
void do_print_python_repr (const print_python_repr &c, unsigned level) const
 Python parsable output to stream. More...
 
- Protected Member Functions inherited from GiNaC::container_storage< C >
 container_storage ()
 
 container_storage (size_t n, const ex &e)
 
 container_storage (std::initializer_list< ex > il)
 
template<class In >
 container_storage (In b, In e)
 
void reserve (size_t)
 
 ~container_storage ()
 
void reserve (size_t n)
 
void reserve (std::vector< ex > &v, size_t n)
 

Protected Attributes

ex symtree
 Index symmetry (tree of symmetry objects) More...
 
- Protected Attributes inherited from GiNaC::basic
unsigned flags
 of type status_flags More...
 
unsigned hashvalue
 hash value More...
 
- Protected Attributes inherited from GiNaC::container_storage< C >
STLT seq
 

Friends

ex simplify_indexed (const ex &e, exvector &free_indices, exvector &dummy_indices, const scalar_products &sp)
 Simplify indexed expression, return list of free indices. More...
 
ex simplify_indexed_product (const ex &e, exvector &free_indices, exvector &dummy_indices, const scalar_products &sp)
 Simplify product of indexed expressions (commutative, noncommutative and simple squares), return list of free indices. More...
 
bool reposition_dummy_indices (ex &e, exvector &variant_dummy_indices, exvector &moved_indices)
 Raise/lower dummy indices in a single indexed objects to canonicalize their variance. More...
 

Additional Inherited Members

- Public Types inherited from GiNaC::container< C >
typedef STLT::const_iterator const_iterator
 
typedef STLT::const_reverse_iterator const_reverse_iterator
 
- Protected Types inherited from GiNaC::container< C >
typedef container_storage< C >::STLT STLT
 
- Protected Types inherited from GiNaC::container_storage< C >
typedef C< exSTLT
 
- Static Protected Member Functions inherited from GiNaC::container< C >
static unsigned get_default_flags ()
 Specialization of container::get_default_flags() for lst. More...
 
static char get_open_delim ()
 Specialization of container::get_open_delim() for lst. More...
 
static char get_close_delim ()
 Specialization of container::get_close_delim() for lst. More...
 
- Static Protected Member Functions inherited from GiNaC::container_storage< C >
static void reserve (STLT &, size_t)
 

Detailed Description

This class holds an indexed expression.

It consists of a 'base' expression (the expression being indexed) which can be accessed as op(0), and n (n >= 0) indices (all of class idx), accessible as op(1)..op(n).

Definition at line 39 of file indexed.h.

Constructor & Destructor Documentation

◆ indexed() [1/13]

GiNaC::indexed::indexed ( const ex b)

Construct indexed object with no index.

Parameters
bBase expression

Definition at line 64 of file indexed.cpp.

References validate().

Referenced by GiNaC::clifford::get_metric(), and thiscontainer().

◆ indexed() [2/13]

GiNaC::indexed::indexed ( const ex b,
const ex i1 
)

Construct indexed object with one index.

The index must be of class idx.

Parameters
bBase expression
i1The index

Definition at line 69 of file indexed.cpp.

References validate().

◆ indexed() [3/13]

GiNaC::indexed::indexed ( const ex b,
const ex i1,
const ex i2 
)

Construct indexed object with two indices.

The indices must be of class idx.

Parameters
bBase expression
i1First index
i2Second index

Definition at line 74 of file indexed.cpp.

References validate().

◆ indexed() [4/13]

GiNaC::indexed::indexed ( const ex b,
const ex i1,
const ex i2,
const ex i3 
)

Construct indexed object with three indices.

The indices must be of class idx.

Parameters
bBase expression
i1First index
i2Second index
i3Third index

Definition at line 79 of file indexed.cpp.

References validate().

◆ indexed() [5/13]

GiNaC::indexed::indexed ( const ex b,
const ex i1,
const ex i2,
const ex i3,
const ex i4 
)

Construct indexed object with four indices.

The indices must be of class idx.

Parameters
bBase expression
i1First index
i2Second index
i3Third index
i4Fourth index

Definition at line 84 of file indexed.cpp.

References validate().

◆ indexed() [6/13]

GiNaC::indexed::indexed ( const ex b,
const symmetry symm,
const ex i1,
const ex i2 
)

Construct indexed object with two indices and a specified symmetry.

The indices must be of class idx.

Parameters
bBase expression
symmSymmetry of indices
i1First index
i2Second index

Definition at line 89 of file indexed.cpp.

References validate().

◆ indexed() [7/13]

GiNaC::indexed::indexed ( const ex b,
const symmetry symm,
const ex i1,
const ex i2,
const ex i3 
)

Construct indexed object with three indices and a specified symmetry.

The indices must be of class idx.

Parameters
bBase expression
symmSymmetry of indices
i1First index
i2Second index
i3Third index

Definition at line 94 of file indexed.cpp.

References validate().

◆ indexed() [8/13]

GiNaC::indexed::indexed ( const ex b,
const symmetry symm,
const ex i1,
const ex i2,
const ex i3,
const ex i4 
)

Construct indexed object with four indices and a specified symmetry.

The indices must be of class idx.

Parameters
bBase expression
symmSymmetry of indices
i1First index
i2Second index
i3Third index
i4Fourth index

Definition at line 99 of file indexed.cpp.

References validate().

◆ indexed() [9/13]

GiNaC::indexed::indexed ( const ex b,
const exvector iv 
)

Construct indexed object with a specified vector of indices.

The indices must be of class idx.

Parameters
bBase expression
ivVector of indices

Definition at line 104 of file indexed.cpp.

References GiNaC::container_storage< C >::seq, and validate().

◆ indexed() [10/13]

GiNaC::indexed::indexed ( const ex b,
const symmetry symm,
const exvector iv 
)

Construct indexed object with a specified vector of indices and symmetry.

The indices must be of class idx.

Parameters
bBase expression
symmSymmetry of indices
ivVector of indices

Definition at line 110 of file indexed.cpp.

References GiNaC::container_storage< C >::seq, and validate().

◆ indexed() [11/13]

GiNaC::indexed::indexed ( const symmetry symm,
const exprseq es 
)

Definition at line 116 of file indexed.cpp.

◆ indexed() [12/13]

GiNaC::indexed::indexed ( const symmetry symm,
const exvector v 
)

Definition at line 120 of file indexed.cpp.

◆ indexed() [13/13]

GiNaC::indexed::indexed ( const symmetry symm,
exvector &&  v 
)

Definition at line 124 of file indexed.cpp.

Member Function Documentation

◆ precedence()

unsigned GiNaC::indexed::precedence ( ) const
inlineoverridevirtual

Return relative operator precedence (for parenthezing output).

Reimplemented from GiNaC::container< C >.

Definition at line 136 of file indexed.h.

Referenced by print_indexed().

◆ info()

bool GiNaC::indexed::info ( unsigned  inf) const
overridevirtual

Information about the object.

See also
class info_flags

Reimplemented from GiNaC::container< C >.

Definition at line 239 of file indexed.cpp.

References GiNaC::info_flags::has_indices, GiNaC::info_flags::indexed, and GiNaC::container_storage< C >::seq.

Referenced by imag_part(), and real_part().

◆ eval()

ex GiNaC::indexed::eval ( ) const
overridevirtual

Perform automatic non-interruptive term rewriting rules.

Reimplemented from GiNaC::basic.

Definition at line 263 of file indexed.cpp.

References GiNaC::_ex0, GiNaC::canonicalize(), GiNaC::basic::ex, GINAC_ASSERT, GiNaC::ex::is_zero(), GiNaC::ex::nops(), GiNaC::ex::op(), GiNaC::container_storage< C >::seq, symtree, and thiscontainer().

◆ real_part()

ex GiNaC::indexed::real_part ( ) const
overridevirtual

Reimplemented from GiNaC::container< C >.

Definition at line 299 of file indexed.cpp.

References info(), GiNaC::container< C >::op(), and GiNaC::info_flags::real.

◆ imag_part()

ex GiNaC::indexed::imag_part ( ) const
overridevirtual

Reimplemented from GiNaC::container< C >.

Definition at line 306 of file indexed.cpp.

References info(), GiNaC::container< C >::op(), and GiNaC::info_flags::real.

◆ get_free_indices()

exvector GiNaC::indexed::get_free_indices ( ) const
overridevirtual

Return a vector containing the free indices of an expression.

Reimplemented from GiNaC::basic.

Definition at line 457 of file indexed.cpp.

References GiNaC::find_free_and_dummy(), and GiNaC::container_storage< C >::seq.

Referenced by get_dummy_indices().

◆ archive()

void GiNaC::indexed::archive ( archive_node n) const
overridevirtual

Save (a.k.a.

serialize) indexed object into archive.

Reimplemented from GiNaC::container< C >.

Definition at line 155 of file indexed.cpp.

References n, and symtree.

◆ read_archive()

void GiNaC::indexed::read_archive ( const archive_node n,
lst syms 
)
overridevirtual

Read (a.k.a.

deserialize) indexed object from archive.

Reimplemented from GiNaC::container< C >.

Definition at line 132 of file indexed.cpp.

References n, GiNaC::not_symmetric(), GiNaC::container_storage< C >::seq, GiNaC::sy_anti(), GiNaC::sy_symm(), GiNaC::symm(), symtree, and validate().

◆ derivative()

ex GiNaC::indexed::derivative ( const symbol s) const
overrideprotectedvirtual

Implementation of ex::diff() for an indexed object always returns 0.

See also
ex::diff

Reimplemented from GiNaC::basic.

Definition at line 388 of file indexed.cpp.

References GiNaC::_ex0.

◆ thiscontainer() [1/2]

ex GiNaC::indexed::thiscontainer ( const exvector v) const
overrideprotected

Definition at line 313 of file indexed.cpp.

References indexed(), and symtree.

Referenced by eval(), and expand().

◆ thiscontainer() [2/2]

ex GiNaC::indexed::thiscontainer ( exvector &&  v) const
overrideprotected

Definition at line 318 of file indexed.cpp.

References indexed(), and symtree.

◆ return_type()

unsigned GiNaC::indexed::return_type ( ) const
overrideprotectedvirtual

Reimplemented from GiNaC::basic.

Definition at line 323 of file indexed.cpp.

References GiNaC::return_types::commutative, GiNaC::container< C >::op(), and GiNaC::ex::return_type().

◆ return_type_tinfo()

return_type_t GiNaC::indexed::return_type_tinfo ( ) const
inlineoverrideprotectedvirtual

Reimplemented from GiNaC::basic.

Definition at line 152 of file indexed.h.

References GiNaC::container< C >::op(), and GiNaC::ex::return_type_tinfo().

◆ expand()

ex GiNaC::indexed::expand ( unsigned  options = 0) const
overrideprotectedvirtual

Expand expression, i.e.

multiply it out and return the result as a new expression.

Reimplemented from GiNaC::basic.

Definition at line 331 of file indexed.cpp.

References GiNaC::_ex0, GiNaC::are_ex_trivially_equal(), GiNaC::expand(), GiNaC::ex::expand(), GiNaC::expand_options::expand_indexed, GINAC_ASSERT, GiNaC::ex::nops(), GiNaC::ex::op(), options, GiNaC::container_storage< C >::seq, and thiscontainer().

◆ all_index_values_are()

bool GiNaC::indexed::all_index_values_are ( unsigned  inf) const

Check whether all index values have a certain property.

See also
class info_flags

Definition at line 246 of file indexed.cpp.

References GiNaC::container_storage< C >::seq.

◆ get_indices()

exvector GiNaC::indexed::get_indices ( ) const

Return a vector containing the object's indices.

Definition at line 423 of file indexed.cpp.

References GINAC_ASSERT, and GiNaC::container_storage< C >::seq.

◆ get_dummy_indices() [1/2]

exvector GiNaC::indexed::get_dummy_indices ( ) const

Return a vector containing the dummy indices of the object, if any.

Definition at line 429 of file indexed.cpp.

References GiNaC::find_free_and_dummy(), and GiNaC::container_storage< C >::seq.

◆ get_dummy_indices() [2/2]

exvector GiNaC::indexed::get_dummy_indices ( const indexed other) const

Return a vector containing the dummy indices in the contraction with another indexed object.

This is symmetric: a.get_dummy_indices(b) == b.get_dummy_indices(a)

Definition at line 436 of file indexed.cpp.

References GiNaC::find_dummy_indices(), and get_free_indices().

◆ has_dummy_index_for()

bool GiNaC::indexed::has_dummy_index_for ( const ex i) const

Check whether the object has an index that forms a dummy index pair with a given index.

Definition at line 446 of file indexed.cpp.

References GiNaC::is_dummy_pair(), and GiNaC::container_storage< C >::seq.

◆ get_symmetry()

ex GiNaC::indexed::get_symmetry ( ) const
inline

Return symmetry properties.

Definition at line 180 of file indexed.h.

References symtree.

Referenced by GiNaC::clifford::get_metric().

◆ printindices()

void GiNaC::indexed::printindices ( const print_context c,
unsigned  level 
) const
protected

◆ print_indexed()

void GiNaC::indexed::print_indexed ( const print_context c,
const char *  openbrace,
const char *  closebrace,
unsigned  level 
) const
protected

Definition at line 207 of file indexed.cpp.

References c, precedence(), printindices(), and GiNaC::container_storage< C >::seq.

Referenced by do_print(), and do_print_latex().

◆ do_print()

void GiNaC::indexed::do_print ( const print_context c,
unsigned  level 
) const
protected

Definition at line 219 of file indexed.cpp.

References c, and print_indexed().

◆ do_print_latex()

void GiNaC::indexed::do_print_latex ( const print_latex c,
unsigned  level 
) const
protected

Definition at line 224 of file indexed.cpp.

References c, and print_indexed().

◆ do_print_tree()

void GiNaC::indexed::do_print_tree ( const print_tree c,
unsigned  level 
) const
protected

◆ validate()

void GiNaC::indexed::validate ( ) const
protected

Check whether all indices are of class idx and validate the symmetry tree.

This function is used internally to make sure that all constructed indexed objects really carry indices and not some other classes.

Definition at line 368 of file indexed.cpp.

References GINAC_ASSERT, GiNaC::ex::is_zero(), GiNaC::container_storage< C >::seq, symtree, and validate().

Referenced by indexed(), read_archive(), and validate().

Friends And Related Function Documentation

◆ simplify_indexed

ex simplify_indexed ( const ex e,
exvector free_indices,
exvector dummy_indices,
const scalar_products sp 
)
friend

Simplify indexed expression, return list of free indices.

Definition at line 1044 of file indexed.cpp.

Referenced by GiNaC::clifford::get_metric(), and GiNaC::clifford::same_metric().

◆ simplify_indexed_product

ex simplify_indexed_product ( const ex e,
exvector free_indices,
exvector dummy_indices,
const scalar_products sp 
)
friend

Simplify product of indexed expressions (commutative, noncommutative and simple squares), return list of free indices.

Definition at line 779 of file indexed.cpp.

◆ reposition_dummy_indices

bool reposition_dummy_indices ( ex e,
exvector variant_dummy_indices,
exvector moved_indices 
)
friend

Raise/lower dummy indices in a single indexed objects to canonicalize their variance.

Parameters
eObject to work on
variant_dummy_indicesThe set of indices that might need repositioning (will be changed by this function)
moved_indicesThe set of indices that have been repositioned (will be changed by this function)
Returns
true if 'e' was changed

Definition at line 618 of file indexed.cpp.

Member Data Documentation

◆ symtree

ex GiNaC::indexed::symtree
protected

Index symmetry (tree of symmetry objects)

Definition at line 192 of file indexed.h.

Referenced by archive(), GiNaC::clifford::do_print_tree(), do_print_tree(), eval(), get_symmetry(), read_archive(), thiscontainer(), and validate().


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.