fix recursion depth O(logN): some algorithms

This commit is contained in:
bolero-MURAKAMI 2013-01-03 17:01:50 +09:00
parent 28697ee7a8
commit 5019f6aa96
162 changed files with 3600 additions and 1659 deletions

View file

@ -4,7 +4,6 @@
#include <iterator>
#include <sprout/config.hpp>
#include <sprout/iterator/operation.hpp>
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT
namespace sprout {
@ -30,7 +29,7 @@ namespace sprout {
),
sprout::detail::max_element_impl_ra(
sprout::next(first, pivot), last, comp,
(NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) - pivot) / 2
(sprout::distance(first, last) - pivot) / 2
),
comp
)
@ -46,7 +45,7 @@ namespace sprout {
return first == last ? last
: sprout::detail::max_element_impl_ra(
first, last, comp,
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2
sprout::distance(first, last) / 2
)
;
}