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