![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
#include <top_n.h>
Public Types | |
| enum | State { UNORDERED , BOTTOM_KNOWN , HEAP_SORTED } |
| using | UnsortedIterator = typename std::vector<T>::const_iterator |
Public Member Functions | |
| TopN (size_t limit) | |
| TopN (size_t limit, const Cmp &cmp) | |
| size_t | limit () const |
| size_t | size () const |
| bool | empty () const |
| void | reserve (size_t n) |
| void | push (const T &v) |
| void | push (const T &v, T *dropped) |
| void | push (T &&v) |
| void | push (T &&v, T *dropped) |
| const T & | peek_bottom () |
| std::vector< T > | Take () |
| std::vector< T > * | Extract () |
| std::vector< T > * | ExtractUnsorted () |
| std::vector< T > * | ExtractNondestructive () const |
| void | ExtractNondestructive (std::vector< T > *output) const |
| std::vector< T > * | ExtractUnsortedNondestructive () const |
| void | ExtractUnsortedNondestructive (std::vector< T > *output) const |
| UnsortedIterator | unsorted_begin () const |
| UnsortedIterator | unsorted_end () const |
| Cmp * | comparator () |
| void | Reset () |
| using operations_research::gtl::TopN< T, Cmp >::UnsortedIterator = typename std::vector<T>::const_iterator |
| enum operations_research::gtl::TopN::State |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
| std::vector< T > * operations_research::gtl::TopN< T, Cmp >::Extract | ( | ) |
| std::vector< T > * operations_research::gtl::TopN< T, Cmp >::ExtractNondestructive | ( | ) | const |
| void operations_research::gtl::TopN< T, Cmp >::ExtractNondestructive | ( | std::vector< T > * | output | ) | const |
| std::vector< T > * operations_research::gtl::TopN< T, Cmp >::ExtractUnsorted | ( | ) |
| std::vector< T > * operations_research::gtl::TopN< T, Cmp >::ExtractUnsortedNondestructive | ( | ) | const |
| void operations_research::gtl::TopN< T, Cmp >::ExtractUnsortedNondestructive | ( | std::vector< T > * | output | ) | const |
|
inline |
| const T & operations_research::gtl::TopN< T, Cmp >::peek_bottom | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void operations_research::gtl::TopN< T, Cmp >::Reset | ( | ) |
|
inline |
| std::vector< T > operations_research::gtl::TopN< T, Cmp >::Take | ( | ) |
|
inline |
|
inline |