Different fixes

This commit is contained in:
Alexander Zaitsev
2017-08-30 20:25:15 +03:00
parent 32016b3c79
commit 7df35ffd56
4 changed files with 50 additions and 35 deletions

View File

@ -23,7 +23,7 @@ int main ( int /*argc*/, char * /*argv*/ [] )
std::cout << "apply_permutation with iterators:\n";
std::vector<int> vec{1, 2, 3, 4, 5}, order{4, 2, 3, 1, 0};
ba::apply_permutation(vec.begin(), vec.end(), order.begin());
ba::apply_permutation(vec.begin(), vec.end(), order.begin(), order.end());
for (const auto& x : vec)
{
std::cout << x << ", ";
@ -34,7 +34,7 @@ int main ( int /*argc*/, char * /*argv*/ [] )
std::cout << "apply_reverse_permutation with iterators:\n";
std::vector<int> vec{1, 2, 3, 4, 5}, order{4, 2, 3, 1, 0};
ba::apply_reverse_permutation(vec.begin(), vec.end(), order.begin());
ba::apply_reverse_permutation(vec.begin(), vec.end(), order.begin(), order.end());
for (const auto& x : vec)
{
std::cout << x << ", ";