diff --git a/docs/_sources/libs/sprout/algorithm/index.txt b/docs/_sources/libs/sprout/algorithm/index.txt index f6e58c75..b26a4889 100644 --- a/docs/_sources/libs/sprout/algorithm/index.txt +++ b/docs/_sources/libs/sprout/algorithm/index.txt @@ -29,6 +29,10 @@ Sprout.Algorithm search_n is_sorted is_sorted_until + is_increasing + is_decreasing + is_strictly_increasing + is_strictly_decreasing .. _sprout-algorithm-non_modifying: ******************************************************************************* @@ -81,8 +85,8 @@ Binary search Heap operations ======================================== -* :doc:`is_heap_until <./is_heap_until>` * :doc:`is_heap <./is_heap>` +* :doc:`is_heap_until <./is_heap_until>` .. _sprout-algorithm-non_modifying-minmax: Minimum and maximum diff --git a/docs/_sources/libs/sprout/algorithm/is_decreasing.txt b/docs/_sources/libs/sprout/algorithm/is_decreasing.txt new file mode 100644 index 00000000..035b0f67 --- /dev/null +++ b/docs/_sources/libs/sprout/algorithm/is_decreasing.txt @@ -0,0 +1,42 @@ +.. _sprout-algorithm-is_decreasing: +############################################################################### +is_decreasing +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + template + inline SPROUT_CONSTEXPR bool + is_decreasing(ForwardIterator first, ForwardIterator last); + +Returns +======================================== + +| Same as ``is_sorted(first, last, greater<>())``. + +Examples +======================================== +.. sourcecode:: c++ + + #include + #include + #include + using namespace sprout; + + SPROUT_STATIC_CONSTEXPR auto input = array{{5, 5, 4, 4, 3, 3, 2, 2, 1, 1}}; + SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing(begin(input), end(input)); + static_assert(result, "input is decreasing."); + +Complexity +======================================== + +| Recursive function invocations in *O(logN)* (logarithmic) depth. + +Header +======================================== + +| ``sprout/algorithm/is_decreasing.hpp`` +| Convenience header: ``sprout/algorithm.hpp`` + diff --git a/docs/_sources/libs/sprout/algorithm/is_increasing.txt b/docs/_sources/libs/sprout/algorithm/is_increasing.txt new file mode 100644 index 00000000..6ded76e8 --- /dev/null +++ b/docs/_sources/libs/sprout/algorithm/is_increasing.txt @@ -0,0 +1,42 @@ +.. _sprout-algorithm-is_increasing: +############################################################################### +is_increasing +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + template + inline SPROUT_CONSTEXPR bool + is_increasing(ForwardIterator first, ForwardIterator last); + +Returns +======================================== + +| Same as ``is_sorted(first, last, less<>())``. + +Examples +======================================== +.. sourcecode:: c++ + + #include + #include + #include + using namespace sprout; + + SPROUT_STATIC_CONSTEXPR auto input = array{{1, 1, 2, 2, 3, 3, 4, 4, 5, 5}}; + SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing(begin(input), end(input)); + static_assert(result, "input is increasing."); + +Complexity +======================================== + +| Recursive function invocations in *O(logN)* (logarithmic) depth. + +Header +======================================== + +| ``sprout/algorithm/is_increasing.hpp`` +| Convenience header: ``sprout/algorithm.hpp`` + diff --git a/docs/_sources/libs/sprout/algorithm/is_strictly_decreasing.txt b/docs/_sources/libs/sprout/algorithm/is_strictly_decreasing.txt new file mode 100644 index 00000000..1e4f88fc --- /dev/null +++ b/docs/_sources/libs/sprout/algorithm/is_strictly_decreasing.txt @@ -0,0 +1,42 @@ +.. _sprout-algorithm-is_strictly_decreasing: +############################################################################### +is_strictly_decreasing +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + template + inline SPROUT_CONSTEXPR bool + is_strictly_decreasing(ForwardIterator first, ForwardIterator last); + +Returns +======================================== + +| Same as ``is_sorted(first, last, greater_equal<>())``. + +Examples +======================================== +.. sourcecode:: c++ + + #include + #include + #include + using namespace sprout; + + SPROUT_STATIC_CONSTEXPR auto input = array{{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}}; + SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing(begin(input), end(input)); + static_assert(result, "input is strictly decreasing."); + +Complexity +======================================== + +| Recursive function invocations in *O(logN)* (logarithmic) depth. + +Header +======================================== + +| ``sprout/algorithm/is_strictly_decreasing.hpp`` +| Convenience header: ``sprout/algorithm.hpp`` + diff --git a/docs/_sources/libs/sprout/algorithm/is_strictly_increasing.txt b/docs/_sources/libs/sprout/algorithm/is_strictly_increasing.txt new file mode 100644 index 00000000..f0aa1f9b --- /dev/null +++ b/docs/_sources/libs/sprout/algorithm/is_strictly_increasing.txt @@ -0,0 +1,42 @@ +.. _sprout-algorithm-is_strictly_increasing: +############################################################################### +is_strictly_increasing +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + template + inline SPROUT_CONSTEXPR bool + is_strictly_increasing(ForwardIterator first, ForwardIterator last); + +Returns +======================================== + +| Same as ``is_sorted(first, last, less_equal<>())``. + +Examples +======================================== +.. sourcecode:: c++ + + #include + #include + #include + using namespace sprout; + + SPROUT_STATIC_CONSTEXPR auto input = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; + SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing(begin(input), end(input)); + static_assert(result, "input is strictly increasing."); + +Complexity +======================================== + +| Recursive function invocations in *O(logN)* (logarithmic) depth. + +Header +======================================== + +| ``sprout/algorithm/is_strictly_increasing.hpp`` +| Convenience header: ``sprout/algorithm.hpp`` + diff --git a/docs/libs/sprout/algorithm/index.html b/docs/libs/sprout/algorithm/index.html index 994c28fe..340b05de 100644 --- a/docs/libs/sprout/algorithm/index.html +++ b/docs/libs/sprout/algorithm/index.html @@ -80,10 +80,10 @@