Class DefaultTensorCanonicalizer

Inheritance Relationships

Base Type

Class Documentation

class DefaultTensorCanonicalizer : public sequant::TensorCanonicalizer

Public Functions

DefaultTensorCanonicalizer() = default
template<typename IndexContainer>
inline DefaultTensorCanonicalizer(IndexContainer &&external_indices)

Warning

external_indices is assumed to be immutable during the lifetime of this object

Template Parameters:

IndexContainer – a Container of Index objects such that IndexContainer::value_type is convertible to Index (e.g. this can be std::vector or std::set , but not std::map)

Parameters:

external_indices – container of external Index objects

virtual ~DefaultTensorCanonicalizer() = default
virtual ExprPtr apply(AbstractTensor &t) override

Implements TensorCanonicalizer::apply

Note

Canonicalizes t by sorting its bra (if t.symmetry()==Symmetry::nonsymm ) or its bra and ket (if t.symmetry()!=Symmetry::nonsymm ), with the external indices appearing “before” (smaller particle indices) than the internal indices

template<typename Compare>
inline ExprPtr apply(AbstractTensor &t, const Compare &comp)

Core of DefaultTensorCanonicalizer::apply, only does the canonicalization, i.e. no tagging/untagging