Documentation ¶
Index ¶
- func BinarySearch(first, last iterator.RandomAccessIterator, val interface{}, ...) bool
- func LowerBound(first, last iterator.RandomAccessIterator, val interface{}, ...) iterator.RandomAccessIterator
- func NextPermutation(first, last iterator.RandomAccessIterator, cmp ...comparator.Comparator) bool
- func NthElement(first, last iterator.RandomAccessIterator, n int, ...)
- func Sort(first, last iterator.RandomAccessIterator, cmp ...comparator.Comparator)
- func Stable(first, last iterator.RandomAccessIterator, cmp ...comparator.Comparator)
- func UpperBound(first, last iterator.RandomAccessIterator, val interface{}, ...) iterator.RandomAccessIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinarySearch ¶
func BinarySearch(first, last iterator.RandomAccessIterator, val interface{}, cmp ...comparator.Comparator) bool
BinarySearch returns true if exist an element witch value is val in the range [first, last), or false if not exist
func LowerBound ¶
func LowerBound(first, last iterator.RandomAccessIterator, val interface{}, cmp ...comparator.Comparator) iterator.RandomAccessIterator
LowerBound returns the iterator pointing to the first element greater than or equal to value passed in the range [first, last), or iterator last if not exist.
func NextPermutation ¶
func NextPermutation(first, last iterator.RandomAccessIterator, cmp ...comparator.Comparator) bool
NextPermutation transform range [first last) to next permutation,return true if success, or false if failure
func NthElement ¶
func NthElement(first, last iterator.RandomAccessIterator, n int, cmps ...comparator.Comparator)
NthElement Rearranges the elements in the range [first,last), in such a way that the element at the nth position is the element that would be in that position in a sorted sequence
func Sort ¶
func Sort(first, last iterator.RandomAccessIterator, cmp ...comparator.Comparator)
Sort sorts the container by using quick sort
func Stable ¶
func Stable(first, last iterator.RandomAccessIterator, cmp ...comparator.Comparator)
Stable sorts the container by using merge sort
func UpperBound ¶
func UpperBound(first, last iterator.RandomAccessIterator, val interface{}, cmp ...comparator.Comparator) iterator.RandomAccessIterator
UpperBound returns the iterator pointing to the first element greater than val in the range [first, last), or iterator last if not exist.
Types ¶
This section is empty.