pelib  2.0.0
pelib::Set< Value, Key > Class Template Reference

#include <Set.hpp>

Inheritance diagram for pelib::Set< Value, Key >:
[legend]

List of all members.

Public Types

typedef std::set< Value > SetType
typedef std::map< Key, SetTypeSetOfSetsType

Public Member Functions

 Set (const std::string name, const SetType values)
 Set (const std::string name, const Key &key, const SetType values)
 Set (const std::string name, const SetOfSetsType values)
 Set (const Set< Value, Key > *set)
virtual Setclone () const
virtual const SetTypegetValues () const
virtual bool exists (Value elem) const
virtual size_t getSize () const
const SetOfSetsTypegetSubsets () const
void merge (const AlgebraData *ptr)
bool isOneSet () const

Protected Attributes

SetOfSetsType values
bool oneSet

Detailed Description

template<class Value, class Key = size_t>
class pelib::Set< Value, Key >

Mathematical Set

Definition at line 40 of file Set.hpp.


Member Typedef Documentation

template<class Value, class Key = size_t>
typedef std::map<Key, SetType> pelib::Set< Value, Key >::SetOfSetsType

Definition at line 45 of file Set.hpp.

template<class Value, class Key = size_t>
typedef std::set<Value> pelib::Set< Value, Key >::SetType

Type of the container that holds all values in this set.

Definition at line 44 of file Set.hpp.


Constructor & Destructor Documentation

template<class Value, class Key = size_t>
pelib::Set< Value, Key >::Set ( const std::string  name,
const SetType  values 
) [inline]

Constructor of a Set with name and values passed as parameters

Definition at line 48 of file Set.hpp.

template<class Value, class Key = size_t>
pelib::Set< Value, Key >::Set ( const std::string  name,
const Key &  key,
const SetType  values 
) [inline]

Constructor of a Set with name, key and values passed as parameters

Definition at line 62 of file Set.hpp.

template<class Value, class Key = size_t>
pelib::Set< Value, Key >::Set ( const std::string  name,
const SetOfSetsType  values 
) [inline]

Constructor of a Set with name and values passed as parameters

Definition at line 69 of file Set.hpp.

template<class Value, class Key = size_t>
pelib::Set< Value, Key >::Set ( const Set< Value, Key > *  set) [inline]

Copy constructor

Definition at line 76 of file Set.hpp.


Member Function Documentation

template<class Value, class Key = size_t>
virtual Set* pelib::Set< Value, Key >::clone ( ) const [inline, virtual]

Returns a pointer to a copy of the Set instance

Implements pelib::AlgebraData.

Definition at line 84 of file Set.hpp.

template<class Value, class Key = size_t>
virtual bool pelib::Set< Value, Key >::exists ( Value  elem) const [inline, virtual]

Returns true if an element equal to elem is found in this set.

Definition at line 107 of file Set.hpp.

template<class Value, class Key = size_t>
virtual size_t pelib::Set< Value, Key >::getSize ( ) const [inline, virtual]

Returns the number of elements in this set

Definition at line 122 of file Set.hpp.

template<class Value, class Key = size_t>
const SetOfSetsType& pelib::Set< Value, Key >::getSubsets ( ) const [inline]

Definition at line 128 of file Set.hpp.

template<class Value, class Key = size_t>
virtual const SetType& pelib::Set< Value, Key >::getValues ( ) const [inline, virtual]

Returns an instance of pelib::SetType containing all values in this Set.

Definition at line 92 of file Set.hpp.

template<class Value, class Key = size_t>
bool pelib::Set< Value, Key >::isOneSet ( ) const [inline]

Return true if this set is composed of exactly 1 subset

Definition at line 159 of file Set.hpp.

template<class Value, class Key = size_t>
void pelib::Set< Value, Key >::merge ( const AlgebraData ) [inline, virtual]

Merge data in this instance and instance given as argument, or replace it if merging is not possible

Implements pelib::AlgebraData.

Definition at line 134 of file Set.hpp.


Member Data Documentation

template<class Value, class Key = size_t>
bool pelib::Set< Value, Key >::oneSet [protected]

Definition at line 167 of file Set.hpp.

template<class Value, class Key = size_t>
SetOfSetsType pelib::Set< Value, Key >::values [protected]

Value container in this set

Definition at line 166 of file Set.hpp.


The documentation for this class was generated from the following file: