the class stores some number of smallest elements from a larger number of candidates
More...
#include <MRFewSmallest.h>
|
| FewSmallest (size_t maxElms=0) |
| configure the object to store at most given number of elements
|
|
void | reset (size_t maxElms) |
| clears the content and reconfigure the object to store at most given number of elements
|
|
size_t | maxElms () const |
| returns the maximum number of elements to be stored here
|
|
bool | empty () const |
| returns whether the container is currently empty
|
|
size_t | size () const |
| returns current number of stored element
|
|
bool | full () const |
| returns whether we have already maximum number of elements stored
|
|
const std::vector< T > & | get () const |
| returns the smallest elements found so far
|
|
const T & | top () const |
| returns the largest among stored smallest elements
|
|
const T & | topOr (const T &emptyRes) const |
| returns the largest among stored smallest elements or given element if this is empty
|
|
void | push (T t) |
| considers one more element, storing it if it is within the smallest
|
|
void | clear () |
| removes all stored elements
|
|
template<typename T>
class MR::FewSmallest< T >
the class stores some number of smallest elements from a larger number of candidates
◆ FewSmallest()
configure the object to store at most given number of elements
◆ clear()
removes all stored elements
◆ empty()
returns whether the container is currently empty
◆ full()
returns whether we have already maximum number of elements stored
◆ get()
returns the smallest elements found so far
◆ maxElms()
returns the maximum number of elements to be stored here
◆ push()
considers one more element, storing it if it is within the smallest
◆ reset()
clears the content and reconfigure the object to store at most given number of elements
◆ size()
returns current number of stored element
◆ top()
returns the largest among stored smallest elements
◆ topOr()
returns the largest among stored smallest elements or given element if this is empty
The documentation for this class was generated from the following file: