add some algorithm test

This commit is contained in:
bolero-MURAKAMI 2012-12-17 00:51:10 +09:00
parent bc04943aaa
commit 570b834367
10 changed files with 255 additions and 0 deletions

View file

@ -10,6 +10,10 @@ namespace sprout {
//
// is_decreasing
//
// recursion depth:
// [first, last) is RandomAccessIterator -> O(log N)
// otherwise -> O(N)
//
template<typename ForwardIterator>
inline SPROUT_CONSTEXPR bool
is_decreasing(ForwardIterator first, ForwardIterator last) {

View file

@ -10,6 +10,10 @@ namespace sprout {
//
// is_increasing
//
// recursion depth:
// [first, last) is RandomAccessIterator -> O(log N)
// otherwise -> O(N)
//
template<typename ForwardIterator>
inline SPROUT_CONSTEXPR bool
is_increasing(ForwardIterator first, ForwardIterator last) {

View file

@ -10,6 +10,10 @@ namespace sprout {
//
// is_strictly_decreasing
//
// recursion depth:
// [first, last) is RandomAccessIterator -> O(log N)
// otherwise -> O(N)
//
template<typename ForwardIterator>
inline SPROUT_CONSTEXPR bool
is_strictly_decreasing(ForwardIterator first, ForwardIterator last) {

View file

@ -10,6 +10,10 @@ namespace sprout {
//
// is_strictly_increasing
//
// recursion depth:
// [first, last) is RandomAccessIterator -> O(log N)
// otherwise -> O(N)
//
template<typename ForwardIterator>
inline SPROUT_CONSTEXPR bool
is_strictly_increasing(ForwardIterator first, ForwardIterator last) {