22 #ifndef DBA_MEMDB_INDEX_H
23 #define DBA_MEMDB_INDEX_H
33 template<
typename T>
class SetIntersection;
34 template<
typename T>
class Sequences;
41 struct Index :
public std::map< T, std::set<size_t> >
43 typedef typename std::map< T, std::set<size_t> >::const_iterator const_iterator;
46 const std::set<size_t>*
search(
const T& el)
const;
67 std::unique_ptr< stl::Sequences<size_t> >
search_from(
const T& first,
bool& found)
const;
81 std::unique_ptr< stl::Sequences<size_t> >
search_to(
const T& end,
bool& found)
const;
95 std::unique_ptr< stl::Sequences<size_t> >
search_between(
const T& first,
const T& end,
bool& found)
const;
98 void query(
const const_iterator& begin,
const const_iterator& end,
const Match<size_t>& filter, BaseResults& res)
const;
99 void query(
const const_iterator& begin,
const const_iterator& end, BaseResults& res)
const;
100 void query(
const const_iterator& begin,
const const_iterator& end,
const Match<size_t>* filter, BaseResults& res)
const;
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
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.
const std::set< size_t > * search(const T &el) const
Lookup all positions for a value.
Base class for match functors.
Definition: match.h:36
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...
Index element positions based by one value.
Definition: index.h:41
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.