diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) | |
download | ydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz |
add ymake export to ydb
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd b/contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd new file mode 100644 index 0000000000..ec7c3835b4 --- /dev/null +++ b/contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd @@ -0,0 +1,43 @@ +from libcpp cimport bool + + +cdef extern from "<algorithm>" namespace "std" nogil: + # Sorting and searching + bool binary_search[Iter, T](Iter first, Iter last, const T& value) + bool binary_search[Iter, T, Compare](Iter first, Iter last, const T& value, + Compare comp) + + Iter lower_bound[Iter, T](Iter first, Iter last, const T& value) + Iter lower_bound[Iter, T, Compare](Iter first, Iter last, const T& value, + Compare comp) + + Iter upper_bound[Iter, T](Iter first, Iter last, const T& value) + Iter upper_bound[Iter, T, Compare](Iter first, Iter last, const T& value, + Compare comp) + + void partial_sort[Iter](Iter first, Iter middle, Iter last) + void partial_sort[Iter, Compare](Iter first, Iter middle, Iter last, + Compare comp) + + void sort[Iter](Iter first, Iter last) + void sort[Iter, Compare](Iter first, Iter last, Compare comp) + + # Removing duplicates + Iter unique[Iter](Iter first, Iter last) + Iter unique[Iter, BinaryPredicate](Iter first, Iter last, BinaryPredicate p) + + # Binary heaps (priority queues) + void make_heap[Iter](Iter first, Iter last) + void make_heap[Iter, Compare](Iter first, Iter last, Compare comp) + + void pop_heap[Iter](Iter first, Iter last) + void pop_heap[Iter, Compare](Iter first, Iter last, Compare comp) + + void push_heap[Iter](Iter first, Iter last) + void push_heap[Iter, Compare](Iter first, Iter last, Compare comp) + + void sort_heap[Iter](Iter first, Iter last) + void sort_heap[Iter, Compare](Iter first, Iter last, Compare comp) + + # Copy + OutputIter copy[InputIter,OutputIter](InputIter,InputIter,OutputIter) |