Rodin::IndexArraySymmetricEquality struct

Functor for comparing two index arrays for symmetric equality.

This functor compares two index arrays and considers them equal if they contain the same elements, regardless of their order. For arrays of size 1 and 2, special cases are handled explicitly for efficiency. For larger arrays, std::is_permutation is used.

Public functions

auto operator()(const IndexArray& lhs, const IndexArray& rhs) const -> bool
Compares two index arrays for symmetric equality.

Function documentation

bool Rodin::IndexArraySymmetricEquality::operator()(const IndexArray& lhs, const IndexArray& rhs) const

Compares two index arrays for symmetric equality.

Parameters
lhs The left-hand side index array.
rhs The right-hand side index array.
Returns true if the arrays are symmetric equal, false otherwise.