mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
add test: some algorithms
This commit is contained in:
parent
e2b207d3be
commit
830fc27394
8 changed files with 176 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue