Compare commits

...

7 Commits

Author SHA1 Message Date
28dd87b90e Merge branch 'develop' 2022-11-09 21:21:12 -08:00
7d8a063d35 Merge pull request #110 from Morwenn/patch-1
Fix links to The Old New Thing
2022-11-07 08:28:29 -08:00
0666c4ce35 Fix links to The Old New Thing
Blogs moved from https://blogs.msdn.microsoft.com to https://devblogs.microsoft.com
2022-11-07 16:44:05 +01:00
6f4d74c6bb Merge pull request #108 from denzor200/denzor200-patch-1
Add forgotten `inline` for `is_palindrome`
2022-10-12 07:39:41 -07:00
6d58f2b9d1 Update is_palindrome.hpp 2022-10-12 19:53:19 +06:00
6a5ca4e89c Merge pull request #107 from fanquake/use_core_enable_if
refactor: use core/enable_if over utility/enable_if
2022-08-30 21:47:33 -07:00
e8ba63c4ad refactor: use core/enable_if over utility/enable_if 2022-08-30 17:28:54 +01:00
10 changed files with 15 additions and 15 deletions

View File

@ -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.

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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

View File

@ -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>

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -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>