PIP 1.0.0_rc3 Platform-Independent Primitives

Public Member Functions | List of all members
PISet< T > Class Template Reference

Set of any type. More...

Inherits PIMap< Key, T >.

## Public Member Functions
| PISet ()
| Contructs an empty set.
| PISet (const T &value)
| Contructs set with one element "value".
| PISet (const T &v0, const T &v1)
| Contructs set with elements "v0" and "v1".
| PISet (const T &v0, const T &v1, const T &v2)
| Contructs set with elements "v0", "v1" and "v2".
| PISet (const T &v0, const T &v1, const T &v2, const T &v3)
| Contructs set with elements "v0", "v1", "v2" and "v3".
| PISet (const PIVector< T > &values)
| Contructs set from vector of elements.
bool | operator[] (const T &t) const
| Returns if element "t" exists in this set.
PISet< T > & | remove (const T &t)
| Returns if element "t" exists in this set.
PISet< T > & | unite (const PISet< T > &v)
| Unite set with "v".
PISet< T > & | subtract (const PISet< T > &v)
| Subtract set with "v".
PIVector< T > | toVector () const
| Returns content of set as PIVector.

## Detailed Description

### template<typename T>
class PISet< T >

Set of any type.

This class used to store collection of unique elements of any type. You can only add values to set with operator<< or with function insert(). You can discover if value already in set with operator[] or with function find(). These function has logarithmic complexity.