#include <set_base.hpp>
Public Types | |
typedef unsigned int | TIndex |
typedef std::pair< TIndex, TIndex > | TIndexPair |
typedef std::set< TIndexPair > | TIndexPairSet |
typedef std::vector< TIndexPair > | TIndexPairVector |
Public Member Functions | |
TIndexPairVector & | data () |
setter for m_data | |
const TIndexPairVector & | data () const |
getter for m_data | |
TIndex | getItem (const TIndex &i) const |
returns the index of the item of i-th element | |
TIndex | getPart (const TIndex &i) const |
returns the index of the part of i-th element | |
const bool & | isSorted () const |
returns if it is a sorted set | |
SetBase (const bool _sorted=true) | |
default constructor, creates empty set | |
void | setSorted (const bool &_sorted) |
Sets the mode of this set: sorted (and unique) or unsorted (and multiple). | |
TIndex | size () const |
returns the number of items | |
void | sortItems () |
sorts the set according to isSorted, used after making changes | |
virtual | ~SetBase () |
destructor | |
Static Public Member Functions | |
static void | data_difference (const TIndexPairVector &a, const TIndexPairVector &b, TIndexPairVector &c, const bool &sorted) |
returns "a difference b" (a \ b) | |
static void | data_intersection (const TIndexPairVector &a, const TIndexPairVector &b, TIndexPairVector &c, const bool &sorted) |
returns "a intersection b" (a ^ b) | |
static void | data_union (const TIndexPairVector &a, const TIndexPairVector &b, TIndexPairVector &c, const bool &sorted) |
returns "a union b" (a U b) | |
Protected Attributes | |
TIndexPairVector | m_data |
the data | |
bool | m_sorted |
is this set a sorted one? |