SyTen
syten::SparseCoordComparator< rank > Struct Template Reference

Comparator for the flatmap used by the Sparse tensor to compare elements. More...

#include <sparse.h>

## Public Member Functions

constexpr bool operator() (std::array< Index, rank > const &a, std::array< Index, rank > const &b) const
Comparator for two arrays of size rank which compares the last digit first. More...

## Detailed Description

### template<Rank rank> struct syten::SparseCoordComparator< rank >

Comparator for the flatmap used by the Sparse tensor to compare elements.

The idea is that by ordering elements with last digit being the most significant and the second tensor of tensor products generally being contracted over their last indices (to aid the dense transposition), we can ensure maximal gain from lower/upper-bounding the region in which to search for a match of a given element of the first tensor in the second tensor.

The documentation for this struct was generated from the following file: