Skip to content

Commit 9abda98

Browse files
Rename validate in konieczny.*pp
1 parent bfa765e commit 9abda98

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

include/libsemigroups/konieczny.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ namespace libsemigroups {
17421742
// Konieczny - validation member functions - private
17431743
////////////////////////////////////////////////////////////////////////
17441744

1745-
void validate_element(const_reference x) const {
1745+
void throw_if_bad_degree(const_reference x) const {
17461746
size_t const n = Degree()(x);
17471747
if (degree() != UNDEFINED && n != degree()) {
17481748
LIBSEMIGROUPS_EXCEPTION(
@@ -1751,7 +1751,7 @@ namespace libsemigroups {
17511751
}
17521752

17531753
template <typename Iterator>
1754-
void validate_element_collection(Iterator first, Iterator last) const;
1754+
void throw_if_bad_degree(Iterator first, Iterator last) const;
17551755

17561756
////////////////////////////////////////////////////////////////////////
17571757
// Konieczny - Runner methods - private

include/libsemigroups/konieczny.tpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ namespace libsemigroups {
247247
LIBSEMIGROUPS_EXCEPTION(
248248
"cannot add generators after the algorithm has begun!");
249249
}
250-
validate_element_collection(first, last);
250+
throw_if_bad_degree(first, last);
251251
// If the _one has already been pushed back into _gens
252252
// (i.e. if data has been initialised), then we should shuffle it to
253253
// the back of the new generators.
@@ -270,9 +270,8 @@ namespace libsemigroups {
270270

271271
template <typename Element, typename Traits>
272272
template <typename Iterator>
273-
void
274-
Konieczny<Element, Traits>::validate_element_collection(Iterator first,
275-
Iterator last) const {
273+
void Konieczny<Element, Traits>::throw_if_bad_degree(Iterator first,
274+
Iterator last) const {
276275
if (degree() == UNDEFINED && std::distance(first, last) != 0) {
277276
auto const n = Degree()(*first);
278277
for (auto it = first + 1; it < last; ++it) {
@@ -284,7 +283,7 @@ namespace libsemigroups {
284283
}
285284
} else {
286285
for (auto it = first; it < last; ++it) {
287-
validate_element(*it);
286+
throw_if_bad_degree(*it);
288287
}
289288
}
290289
}

0 commit comments

Comments
 (0)