Skip to content

Commit

Permalink
const_contains -> contains_no_run
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Edwards committed Nov 8, 2024
1 parent f008948 commit f33f8ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions include/libsemigroups/schreier-sims.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,9 @@ namespace libsemigroups {
return sift_no_checks(x);
}

//! \brief Test membership of an element (const).
//! \brief Test membership of an element without running.
//!
//! Test membership of an element (const).
//! Test membership of an element without running.
//!
//! \param x a const reference to the possible element.
//!
Expand All @@ -749,8 +749,10 @@ namespace libsemigroups {
// isn't true, because we either run to the end or haven't done anything at
// all.
// not noexcept because sift_no_checks isn't
[[nodiscard]] bool const_contains(const_element_reference x) const;
[[nodiscard]] bool contains_no_run(const_element_reference x) const;

//! \brief Test membership of an element.
//!
//! Test membership of an element.
//!
//! \param x a const reference to the possible element.
Expand Down
4 changes: 2 additions & 2 deletions include/libsemigroups/schreier-sims.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ namespace libsemigroups {
}

template <size_t N, typename Point, typename Element, typename Traits>
bool SchreierSims<N, Point, Element, Traits>::const_contains(
bool SchreierSims<N, Point, Element, Traits>::contains_no_run(
const_element_reference x) const {
if (!is_valid_degree(Degree()(x))) {
return false;
Expand All @@ -197,7 +197,7 @@ namespace libsemigroups {
SchreierSims<N, Point, Element, Traits>::contains(const_element_reference x) {
if (is_valid_degree(Degree()(x))) {
run();
return const_contains(x);
return contains_no_run(x);
} else {
return false;
}
Expand Down

0 comments on commit f33f8ff

Please sign in to comment.