sfem::groups::SetBase Class Reference

base class of sets/groups More...

#include <set_base.hpp>

Inheritance diagram for sfem::groups::SetBase:

Inheritance graph
[legend]
Collaboration diagram for sfem::groups::SetBase:

Collaboration graph
[legend]

List of all members.

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?


Detailed Description

base class of sets/groups
The documentation for this class was generated from the following file:

Generated on Wed Nov 17 17:35:54 2010 for 'sfem' Module Programming Interface by  doxygen 1.5.6