mirror of
https://github.com/boostorg/algorithm.git
synced 2025-06-25 20:11:50 +02:00
Compare commits
7 Commits
boost-1.80
...
boost-1.82
Author | SHA1 | Date | |
---|---|---|---|
28dd87b90e | |||
7d8a063d35 | |||
0666c4ce35 | |||
6f4d74c6bb | |||
6d58f2b9d1 | |||
6a5ca4e89c | |||
e8ba63c4ad |
@ -16,12 +16,12 @@ The routine `apply_permutation` takes a item sequence and a order sequence. It r
|
||||
The routine `apply_reverse_permutation` takes a item sequence and a order sequence. It will reshuffle item sequence according to order sequence. Every value in order sequence means where the item goes to. Order sequence needs to be exactly a permutation of the sequence [0, 1, ... , N], where N is the biggest index in the item sequence (zero-indexed).
|
||||
|
||||
Implementations are based on these articles:
|
||||
https://blogs.msdn.microsoft.com/oldnewthing/20170102-00/?p=95095
|
||||
https://blogs.msdn.microsoft.com/oldnewthing/20170103-00/?p=95105
|
||||
https://blogs.msdn.microsoft.com/oldnewthing/20170104-00/?p=95115
|
||||
https://blogs.msdn.microsoft.com/oldnewthing/20170109-00/?p=95145
|
||||
https://blogs.msdn.microsoft.com/oldnewthing/20170110-00/?p=95155
|
||||
https://blogs.msdn.microsoft.com/oldnewthing/20170111-00/?p=95165
|
||||
https://devblogs.microsoft.com/oldnewthing/20170102-00/?p=95095
|
||||
https://devblogs.microsoft.com/oldnewthing/20170103-00/?p=95105
|
||||
https://devblogs.microsoft.com/oldnewthing/20170104-00/?p=95115
|
||||
https://devblogs.microsoft.com/oldnewthing/20170109-00/?p=95145
|
||||
https://devblogs.microsoft.com/oldnewthing/20170110-00/?p=95155
|
||||
https://devblogs.microsoft.com/oldnewthing/20170111-00/?p=95165
|
||||
|
||||
The routines come in 2 forms; the first one takes two iterators to define the item range and one iterator to define the beginning of index range. The second form takes range to define the item sequence and range to define index sequence.
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <functional> // for plus and multiplies
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/utility/enable_if.hpp> // for boost::disable_if
|
||||
#include <boost/core/enable_if.hpp> // for boost::disable_if
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
|
||||
namespace boost { namespace algorithm {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/type_traits/type_identity.hpp> // for boost::type_identity
|
||||
#include <boost/utility/enable_if.hpp> // for boost::disable_if
|
||||
#include <boost/core/enable_if.hpp> // for boost::disable_if
|
||||
|
||||
namespace boost { namespace algorithm {
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace algorithm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/type_identity.hpp> // for boost::type_identity
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
|
||||
|
||||
|
@ -113,7 +113,7 @@ bool is_palindrome(const R& range, Predicate p)
|
||||
/// \note This function will return true for empty sequences and for palindromes.
|
||||
/// For other sequences function will return false.
|
||||
/// Complexity: O(N).
|
||||
bool is_palindrome(const char* str)
|
||||
inline bool is_palindrome(const char* str)
|
||||
{
|
||||
if(!str)
|
||||
return true;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/algorithm/searching/detail/bm_traits.hpp>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/algorithm/searching/detail/bm_traits.hpp>
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/algorithm/searching/detail/debugging.hpp>
|
||||
|
Reference in New Issue
Block a user