Skip to content

Commit

Permalink
improve permutation.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
qddyy committed Dec 15, 2024
1 parent 6330637 commit 532bc89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inst/include/pmt/permutation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ double n_permutation(T first, T last)
}

template <typename T>
auto random_shuffle(T v)
auto random_shuffle(T& v)
{
return random_shuffle(v.begin(), v.end());
}

template <typename T>
auto next_permutation(T v)
auto next_permutation(T& v)
{
return next_permutation(v.begin(), v.end());
}

template <typename T>
auto n_permutation(T v)
auto n_permutation(const T& v)
{
return n_permutation(v.begin(), v.end());
}

0 comments on commit 532bc89

Please sign in to comment.