libdballe
7.7
|
Index element positions based by one value. More...
#include <index.h>
Public Types | |
typedef std::map< T, std::set< size_t > >::const_iterator | const_iterator |
Public Member Functions | |
const std::set< size_t > * | search (const T &el) const |
Lookup all positions for a value. | |
bool | search (const T &el, stl::SetIntersection< size_t > &out) const |
Lookup all positions for a value, appending the results to a SetIntersection. More... | |
std::unique_ptr< stl::Sequences< size_t > > | search_from (const T &first, bool &found) const |
Lookup all positions for a value and all values after it, appending the results to a Sequences. More... | |
std::unique_ptr< stl::Sequences< size_t > > | search_to (const T &end, bool &found) const |
Lookup all positions all values before the given one, appending the results to a Sequences. More... | |
std::unique_ptr< stl::Sequences< size_t > > | search_between (const T &first, const T &end, bool &found) const |
Lookup all positions all values between two extremes (first included, second excluded), appending the results to a Sequences. More... | |
Index element positions based by one value.
bool dballe::memdb::Index< T >::search | ( | const T & | el, |
stl::SetIntersection< size_t > & | out | ||
) | const |
Lookup all positions for a value, appending the results to a SetIntersection.
std::unique_ptr< stl::Sequences<size_t> > dballe::memdb::Index< T >::search_between | ( | const T & | first, |
const T & | end, | ||
bool & | found | ||
) | const |
Lookup all positions all values between two extremes (first included, second excluded), appending the results to a Sequences.
If the extremes match the whole index, returns 0 without allocating a Sequences, and sets found to true.
If the extremes do not match anything in the index, returns 0 without allocating a Sequences and sets found to false.
Else, returns a Sequences and sets found to true.
std::unique_ptr< stl::Sequences<size_t> > dballe::memdb::Index< T >::search_from | ( | const T & | first, |
bool & | found | ||
) | const |
Lookup all positions for a value and all values after it, appending the results to a Sequences.
If the extremes match the whole index, returns 0 without allocating a Sequences, and sets found to true.
If the extremes do not match anything in the index, returns 0 without allocating a Sequences and sets found to false.
Else, returns a Sequences and sets found to true.
std::unique_ptr< stl::Sequences<size_t> > dballe::memdb::Index< T >::search_to | ( | const T & | end, |
bool & | found | ||
) | const |
Lookup all positions all values before the given one, appending the results to a Sequences.
If the extremes match the whole index, returns 0 without allocating a Sequences, and sets found to true.
If the extremes do not match anything in the index, returns 0 without allocating a Sequences and sets found to false.
Else, returns a Sequences and sets found to true.