Template Struct TensorBlockComparator

Struct Documentation

template<template<class> class Comparator, template<class> class Selector, bool fallback>
struct TensorBlockComparator

Comparator template that compares tensor blocks (slots). This means that it takes only the spaces of indices into account but not their concrete labeling (i.e. i1 and i2 are considered equal). Note that the comparison will NOT take the exact location in bra/ket/aux into consideration explicitly. It compares the sequence of all indices which will lead to t{a1,i1} comparing equal to e.g. t{;a1,i1;}. The assumption here is that the bra/ket/aux is not important at the level where tensor blocks are relevant (e.g. during numerical evaluation).

Public Functions

inline auto operator()(const Tensor &lhs, const Tensor &rhs) const
inline bool operator()(const Expr &lhs, const Expr &rhs) const
inline bool operator()(const ExprPtr &lhs, const ExprPtr &rhs) const