Skip to content

Commit

Permalink
introduced MultiIndex comparison operators
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Jun 5, 2024
1 parent da5d5ef commit 48c6010
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ttg/ttg/util/multiindex.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ namespace ttg {
}

std::array<Int, Rank> data_;

friend bool operator==(const MultiIndex<Rank> &lhs, const MultiIndex<Rank> &rhs) {
return lhs.data_ == rhs.data_;
}
friend bool operator!=(const MultiIndex<Rank> &lhs, const MultiIndex<Rank> &rhs) {
return !(lhs == rhs);
}
};

template <std::size_t Rank>
Expand Down

0 comments on commit 48c6010

Please sign in to comment.