algorithm.pxd 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from libcpp cimport bool
  2. cdef extern from "<algorithm>" namespace "std" nogil:
  3. # Sorting and searching
  4. bool binary_search[Iter, T](Iter first, Iter last, const T& value)
  5. bool binary_search[Iter, T, Compare](Iter first, Iter last, const T& value,
  6. Compare comp)
  7. Iter lower_bound[Iter, T](Iter first, Iter last, const T& value)
  8. Iter lower_bound[Iter, T, Compare](Iter first, Iter last, const T& value,
  9. Compare comp)
  10. Iter upper_bound[Iter, T](Iter first, Iter last, const T& value)
  11. Iter upper_bound[Iter, T, Compare](Iter first, Iter last, const T& value,
  12. Compare comp)
  13. void partial_sort[Iter](Iter first, Iter middle, Iter last)
  14. void partial_sort[Iter, Compare](Iter first, Iter middle, Iter last,
  15. Compare comp)
  16. void sort[Iter](Iter first, Iter last)
  17. void sort[Iter, Compare](Iter first, Iter last, Compare comp)
  18. # Removing duplicates
  19. Iter unique[Iter](Iter first, Iter last)
  20. Iter unique[Iter, BinaryPredicate](Iter first, Iter last, BinaryPredicate p)
  21. # Binary heaps (priority queues)
  22. void make_heap[Iter](Iter first, Iter last)
  23. void make_heap[Iter, Compare](Iter first, Iter last, Compare comp)
  24. void pop_heap[Iter](Iter first, Iter last)
  25. void pop_heap[Iter, Compare](Iter first, Iter last, Compare comp)
  26. void push_heap[Iter](Iter first, Iter last)
  27. void push_heap[Iter, Compare](Iter first, Iter last, Compare comp)
  28. void sort_heap[Iter](Iter first, Iter last)
  29. void sort_heap[Iter, Compare](Iter first, Iter last, Compare comp)
  30. # Copy
  31. OutputIter copy[InputIter,OutputIter](InputIter,InputIter,OutputIter)