Skip to content

Commit

Permalink
hes_no_marks
Browse files Browse the repository at this point in the history
  • Loading branch information
koniksedy committed Dec 2, 2024
1 parent 952cec2 commit 61019de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nfa/operations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ class RefinablePartition {
* @param s The set index.
* @return True if the set has no marked elements, false otherwise.
*/
inline bool no_marks(const size_t s) const { return mid[s] == first[s]; }
inline bool has_no_marks(const size_t s) const { return mid[s] == first[s]; }

/**
* @brief Split the set into two sets according to the marked elements (the mid).
Expand Down Expand Up @@ -1229,7 +1229,7 @@ Nfa mata::nfa::algorithms::minimize_hopcroft(const Nfa& dfa_trimmed) {
for (State q = brp.get_first(b_prime); q != RefinablePartition<State>::NO_MORE_ELEMENTS; q = brp.get_next(q)) {
for (const size_t trans_idx : incomming_trans_idxs[q]) {
const size_t splitter_idx = trp.set_idx[trans_idx];
if (trp.no_marks(splitter_idx)) {
if (trp.has_no_marks(splitter_idx)) {
touched_spls.push(splitter_idx);
}
// Mark the transition in the splitter and move it to the first half of the set.
Expand Down Expand Up @@ -1269,7 +1269,7 @@ Nfa mata::nfa::algorithms::minimize_hopcroft(const Nfa& dfa_trimmed) {
for (size_t trans_idx = trp.get_first(splitter_idx); trans_idx != RefinablePartition<size_t>::NO_MORE_ELEMENTS; trans_idx = trp.get_next(trans_idx)) {
const State q = trans_source_map[trans_idx];
const size_t b_prime = brp.set_idx[q];
if (brp.no_marks(b_prime)) {
if (brp.has_no_marks(b_prime)) {
touched_blocks.push(b_prime);
}
brp.mark(q);
Expand Down

0 comments on commit 61019de

Please sign in to comment.