add test: some algorithms

This commit is contained in:
bolero-MURAKAMI 2013-01-11 03:17:06 +09:00
parent e2b207d3be
commit 830fc27394
8 changed files with 176 additions and 12 deletions

View file

@ -1,6 +1,7 @@
#ifndef SPROUT_ALGORITHM_BINARY_SEARCH_HPP
#define SPROUT_ALGORITHM_BINARY_SEARCH_HPP
#include <iterator>
#include <sprout/config.hpp>
#include <sprout/algorithm/lower_bound.hpp>
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT
@ -17,8 +18,7 @@ namespace sprout {
// 25.4.3.4 binary_search
//
// recursion depth:
// [first, last) is RandomAccessIterator -> O(log N)
// otherwise -> O(N)
// O(log N)
//
template<typename ForwardIterator, typename T, typename Compare>
inline SPROUT_CONSTEXPR bool