Template Struct CanonicalTensorCompare¶
Defined in File tensor_network_v2.cpp
Struct Documentation¶
-
template<typename CardinalLabels>
struct CanonicalTensorCompare¶ Compares tensors based on their label and orders them according to the order of the given cardinal tensor labels. If two tensors can’t be discriminated via their label, they are compared based on regular AbstractTensor::operator< or based on their tensor block (the spaces of their indices) - depending on the configuration. If this doesn’t discriminate the tensors, they are considered equal
Public Functions
-
inline CanonicalTensorCompare(const CardinalLabels &labels, bool blocks_only)¶
-
inline void set_blocks_only(bool blocks_only)¶
-
inline bool operator()(const AbstractTensorPtr &lhs_ptr, const AbstractTensorPtr &rhs_ptr) const¶
-
template<typename AbstractTensorPtr_T>
inline bool operator()(const AbstractTensorPtr_T &lhs_ptr, const AbstractTensorPtr_T &rhs_ptr) const¶
-
inline CanonicalTensorCompare(const CardinalLabels &labels, bool blocks_only)¶