23#ifndef GINAC_SYMMETRY_H
24#define GINAC_SYMMETRY_H
156ex
symmetrize(
const ex & e, exvector::const_iterator first, exvector::const_iterator
last);
165ex
antisymmetrize(
const ex & e, exvector::const_iterator first, exvector::const_iterator
last);
Archiving of GiNaC expressions.
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
Wrapper template for making GiNaC classes out of STL containers.
Lightweight wrapper for GiNaC's symbolic objects.
const_iterator begin() const noexcept
Base class for print_contexts.
Context for tree-like output for debugging.
This class describes the symmetry of a group of indices.
void read_archive(const archive_node &n, lst &syms) override
Read (a.k.a.
void validate(unsigned n)
Verify that all indices of this node are in the range [0..n-1].
symmetry_type
Type of symmetry.
@ symmetric
totally symmetric
@ antisymmetric
totally antisymmetric
@ none
no symmetry properties
friend int canonicalize(exvector::iterator v, const symmetry &symm)
Canonicalize the order of elements of an expression vector, according to the symmetry properties defi...
bool has_nonsymmetric() const
Check whether this node involves anything non symmetric.
symmetry & add(const symmetry &c)
Add child node, check index sets for consistency.
symmetry_type type
Type of symmetry described by this node.
void do_print(const print_context &c, unsigned level) const
exvector children
Vector of child nodes.
symmetry_type get_type() const
Get symmetry type.
void set_type(symmetry_type t)
Set symmetry type.
bool has_cyclic() const
Check whether this node involves a cyclic symmetry.
std::set< unsigned > indices
Sorted union set of all indices handled by this node.
symmetry(unsigned i)
Create leaf node that represents one index.
bool has_symmetry() const
Check whether this node actually represents any kind of symmetry.
unsigned calchash() const override
Compute the hash value of an object and if it makes sense to store it in the objects status_flags,...
void do_print_tree(const print_tree &c, unsigned level) const
void archive(archive_node &n) const override
Save (a.k.a.
Interface to GiNaC's light-weight expression handles.
const symmetry & antisymmetric4()
const symmetry & symmetric3()
const symmetry & not_symmetric()
ex symmetrize(const ex &thisex)
const symmetry & antisymmetric3()
GINAC_DECLARE_UNARCHIVER(add)
const symmetry & antisymmetric2()
const symmetry & symmetric2()
ex antisymmetrize(const ex &thisex)
const symmetry & symmetric4()
static ex symm(const ex &e, exvector::const_iterator first, exvector::const_iterator last, bool asymmetric)
int canonicalize(exvector::iterator v, const symmetry &symm)
Canonicalize the order of elements of an expression vector, according to the symmetry properties defi...
ex symmetrize_cyclic(const ex &thisex)
std::vector< ex > exvector
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.