Struct TensorBlockIndexComparer

Struct Documentation

struct TensorBlockIndexComparer

orders indices (or bra/ket pairs of indices) by their spaces, then puts external indices before internal ones

Public Functions

TensorBlockIndexComparer() = default
inline explicit TensorBlockIndexComparer(container::set<Index> externals)
Parameters:

externals – the external indices (only those of the tensor being canonicalized are needed)

template<typename T>
inline bool operator()(const T &lhs, const T &rhs) const
template<typename T>
inline int compare(const T &lhs, const T &rhs) const
inline int compare_spaces(const Index &lhs, const Index &rhs) const
inline int compare_externality(const Index &lhs, const Index &rhs) const

external indices come before internal ones