Set<T, C> Class

A collection of unique elements that are kept sorted in a RedBlackTree .

Searching for an element in the set and inserting an element to the set are Olog(n) operations.

Model of BidirectionalContainer .

Template Parameters

T
C Less<T>

Constraint

T  is  Semiregular  and  C  is  Relation  and  C .Domain is  T

Member Functions

public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> Begin()
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> Begin() const
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CBegin() const
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CEnd() const
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CFind(const T& key) const
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CLowerBound(const T& key) const
public nothrow void Clear()
public inline nothrow long Count() const
public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> End()
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> End() const
public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> Find(const T& key)
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> Find(const T& key) const
public inline Pair<RedBlackTreeNodeIterator<T, T&, T*>, bool> Insert(const T& value)
public inline nothrow bool IsEmpty() const
public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> LowerBound(const T& key)
public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> LowerBound(const T& key) const
public inline nothrow void Remove(RedBlackTreeNodeIterator<T, T&, T*> pos)
public inline nothrow bool Remove(const T& key)

Typedefs

public typedef Compare C
public typedef ConstIterator RedBlackTreeNodeIterator<T, const T&, const T*>
public typedef Iterator RedBlackTreeNodeIterator<T, T&, T*>
public typedef KeyType T
private typedef Self Set
private typedef TreeType RedBlackTree<T, T, Identity<T>, C>
public typedef ValueType T

Member Variables

private RedBlackTree<T, T, Identity<T>, C> tree

Member Function Details

Begin Member Function

public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> Begin()

Definition
Line 23 of System.Base/Set.cm


Begin Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> Begin()

Definition
Line 27 of System.Base/Set.cm


CBegin Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CBegin()

Definition
Line 31 of System.Base/Set.cm


CEnd Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CEnd()

Definition
Line 43 of System.Base/Set.cm


CFind Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CFind(const T& key)

Definition
Line 67 of System.Base/Set.cm


CLowerBound Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> CLowerBound(const T& key)

Definition
Line 79 of System.Base/Set.cm


Clear Member Function

public nothrow void Clear()

Definition
Line 55 of System.Base/Set.cm


Count Member Function

public inline nothrow long Count()

Definition
Line 47 of System.Base/Set.cm


End Member Function

public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> End()

Definition
Line 35 of System.Base/Set.cm


End Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> End()

Definition
Line 39 of System.Base/Set.cm


Find Member Function

public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> Find(const T& key)

Definition
Line 59 of System.Base/Set.cm


Find Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> Find(const T& key)

Definition
Line 63 of System.Base/Set.cm


Insert Member Function

public inline Pair<RedBlackTreeNodeIterator<T, T&, T*>, bool> Insert(const T& value)

Constraint
T  is  Copyable
Definition
Line 83 of System.Base/Set.cm


IsEmpty Member Function

public inline nothrow bool IsEmpty()

Definition
Line 51 of System.Base/Set.cm


LowerBound Member Function

public inline nothrow RedBlackTreeNodeIterator<T, T&, T*> LowerBound(const T& key)

Definition
Line 71 of System.Base/Set.cm


LowerBound Member Function

public inline nothrow RedBlackTreeNodeIterator<T, const T&, const T*> LowerBound(const T& key)

Definition
Line 75 of System.Base/Set.cm


Remove Member Function

public inline nothrow void Remove(RedBlackTreeNodeIterator<T, T&, T*> pos)

Definition
Line 92 of System.Base/Set.cm


Remove Member Function

public inline nothrow bool Remove(const T& key)

Definition
Line 88 of System.Base/Set.cm