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

@ -7,7 +7,7 @@
#include <sprout/algorithm/fixed/nth_element.hpp>
#include <sprout/algorithm/fit/result_of.hpp>
#include <sprout/sub_array.hpp>
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT
#include <sprout/iterator/operation.hpp>
namespace sprout {
namespace fit {
@ -22,7 +22,7 @@ namespace sprout {
return sprout::sub_copy(
sprout::get_internal(sprout::fixed::nth_element(cont, nth, comp)),
offset,
offset + NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::begin(cont), nth) + 1
offset + sprout::distance(sprout::begin(cont), nth) + 1
);
}
} // namespace detail
@ -46,7 +46,7 @@ namespace sprout {
return sprout::sub_copy(
sprout::get_internal(sprout::fixed::nth_element(cont, nth)),
offset,
offset + NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::begin(cont), nth) + 1
offset + sprout::distance(sprout::begin(cont), nth) + 1
);
}
} // namespace detail