22#ifndef GINAC_INDEXED_H
23#define GINAC_INDEXED_H
81 indexed(
const ex & b,
const ex & i1,
const ex & i2,
const ex & i3,
const ex & i4);
136 bool info(
unsigned inf)
const override;
152 ex expand(
unsigned options = 0)
const override;
210typedef std::map<spmapkey, ex>
spmap;
219 void add(
const ex & v1,
const ex & v2,
const ex & sp);
222 void add(
const ex & v1,
const ex & v2,
const ex & dim,
const ex & sp);
add(const ex &lh, const ex &rh)
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
ex op(size_t i) const override
Lightweight wrapper for GiNaC's symbolic objects.
return_type_t return_type_tinfo() const
This class holds an indexed expression.
bool all_index_values_are(unsigned inf) const
Check whether all index values have a certain property.
ex thiscontainer(const exvector &v) const override
Similar to duplicate(), but with a preset sequence.
friend ex simplify_indexed(const ex &e, exvector &free_indices, exvector &dummy_indices, const scalar_products &sp)
Simplify indexed expression, return list of free indices.
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
void printindices(const print_context &c, unsigned level) const
exvector get_free_indices() const override
Return a vector containing the free indices of an expression.
ex get_symmetry() const
Return symmetry properties.
void do_print(const print_context &c, unsigned level) const
void do_print_latex(const print_latex &c, unsigned level) const
friend 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.
void read_archive(const archive_node &n, lst &syms) override
Read (a.k.a.
void do_print_tree(const print_tree &c, unsigned level) const
ex derivative(const symbol &s) const override
Implementation of ex::diff() for an indexed object always returns 0.
bool info(unsigned inf) const override
Information about the object.
indexed(const ex &b)
Construct indexed object with no index.
void validate() const
Check whether all indices are of class idx and validate the symmetry tree.
ex symtree
Index symmetry (tree of symmetry objects).
exvector get_indices() const
Return a vector containing the object's indices.
return_type_t return_type_tinfo() const override
exvector get_dummy_indices() const
Return a vector containing the dummy indices of the object, if any.
void print_indexed(const print_context &c, const char *openbrace, const char *closebrace, unsigned level) const
friend 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),...
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.
unsigned return_type() const override
Base class for print_contexts.
Context for latex-parsable output.
Context for tree-like output for debugging.
Helper class for storing information about known scalar products which are to be automatically replac...
bool is_defined(const ex &v1, const ex &v2, const ex &dim) const
Check whether scalar product pair is defined.
ex evaluate(const ex &v1, const ex &v2, const ex &dim) const
Return value of defined scalar product pair.
void clear()
Clear all registered scalar products.
void add_vectors(const lst &l, const ex &dim=wild())
Register list of vectors.
This class describes the symmetry of a group of indices.
Definition of GiNaC's exprseq.
std::map< spmapkey, ex > spmap
ex real_part(const ex &thisex)
container< std::list > lst
const relational operator==(const ex &lh, const ex &rh)
GINAC_DECLARE_UNARCHIVER(add)
ex eval(const ex &thisex)
lst rename_dummy_indices_uniquely(const exvector &va, const exvector &vb)
Similar to above, where va and vb are the same and the return value is a list of two lists for substi...
const relational operator<(const ex &lh, const ex &rh)
ex expand_dummy_sum(const ex &e, bool subs_idx)
This function returns the given expression with expanded sums for all dummy index summations,...
std::vector< ex > exvector
ex imag_part(const ex &thisex)
exvector get_all_dummy_indices(const ex &e)
Returns all dummy indices from the exvector.
ex wild(unsigned label=0)
Create a wildcard object with the specified label.
container< std::vector > exprseq
exvector get_all_dummy_indices_safely(const ex &e)
More reliable version of the form.
ex expand(const ex &thisex, unsigned options=0)
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.
To distinguish between different kinds of non-commutative objects.
Interface to GiNaC's wildcard objects.