mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix recursion depth O(logN): some algorithms
This commit is contained in:
parent
28697ee7a8
commit
5019f6aa96
162 changed files with 3600 additions and 1659 deletions
|
@ -4,7 +4,6 @@
|
|||
#include <iterator>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT
|
||||
|
||||
namespace sprout {
|
||||
namespace detail {
|
||||
|
@ -22,7 +21,7 @@ namespace sprout {
|
|||
)
|
||||
&& sprout::detail::all_of_equal_impl_ra(
|
||||
sprout::next(first, pivot), last, value,
|
||||
(NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) - pivot) / 2
|
||||
(sprout::distance(first, last) - pivot) / 2
|
||||
)
|
||||
;
|
||||
}
|
||||
|
@ -34,7 +33,7 @@ namespace sprout {
|
|||
)
|
||||
{
|
||||
return first == last ? true
|
||||
: sprout::detail::all_of_equal_impl_ra(first, last, value, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2)
|
||||
: sprout::detail::all_of_equal_impl_ra(first, last, value, sprout::distance(first, last) / 2)
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue