Skip to content

Commit

Permalink
Shuffle()
Browse files Browse the repository at this point in the history
  • Loading branch information
nightly committed Aug 21, 2023
1 parent fe33238 commit a21ee72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lts/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ namespace nightly {
}

const std::vector<Transition<KeyT, TransitionT>>& transitions_shuffled(std::mt19937& rng) {
std::shuffle(transitions_.begin(), transitions_.end(), rng);
Shuffle(rng);
return transitions_;
}

void Shuffle(std::mt19937& rng) {
std::shuffle(transitions_.begin(), transitions_.end(), rng);
}

void AddTransition(const TransitionT& label, const KeyT& end_state) {
transitions_.emplace_back(label, end_state);
}
Expand Down

0 comments on commit a21ee72

Please sign in to comment.