Template Class IrrepContext¶
Defined in File propagation.hpp
Class Documentation¶
-
template<IrrepAlgebra A>
class IrrepContext¶ Combines an IRREP algebra with a resolver that determines the IRREPs of leaf tensors. Objects of this type are the context needed to determine the IRREPs of arbitrary expressions via irreps_of.
Public Types
-
using set_type = IrrepSet<irrep_type>¶
-
using parser_type = std::function<irrep_type(std::string_view)>¶
Public Functions
-
inline IrrepContext(A algebra, resolver_type resolver, parser_type parser = {}, variable_resolver_type variable_resolver = {})¶
- Parameters:
parser – Converts the name of an IRREP into the IRREP. Only needed for canonical_irrep.
variable_resolver – Determines the IRREPs of scalar variables. Variables for which it returns no value (or all, if not given) are totally symmetric.
-
inline explicit IrrepContext(resolver_type resolver)¶
-
inline const resolver_type &resolver() const¶
-
inline set_type irreps_of(const Tensor &tensor) const¶
- Returns:
The IRREPs of the given (leaf) tensor. Tensors with reserved labels (Kronecker delta, overlap, (anti)symmetrizers, reference densities, …) are considered to be totally symmetric. All others are handed to the resolver.
-
inline set_type irreps_of(const Variable &variable) const¶
- Returns:
The IRREPs of the given variable. Unless the variable resolver says otherwise, variables are totally symmetric.
-
inline bool is_totally_symmetric(const set_type &set) const¶
- Returns:
Whether the given set contains nothing but the totally symmetric IRREP
-
inline irrep_type canonical_irrep(std::string_view name) const¶
- Throws:
Exception – if this context has no parser or if the name does not refer to exactly one IRREP
- Returns:
The IRREP of the given name in the algebra’s canonical form (e.g. with relations between IRREPs applied)
-
using set_type = IrrepSet<irrep_type>¶