Example #1
0
 /// <summary>
 /// Creates an instance of SetBase.
 /// </summary>
 /// <param name="comparer">Comparer that specifies sort order of the elements.</param>
 /// <param name="allowDuplicates">Whether multiple duplicate (equivalent) elements are allowed.</param>
 public SetBase(IComparer comparer, bool allowDuplicates)
 {
     _comparer = comparer;
     _allowDuplicates = allowDuplicates;
     _tree = new RbTree(_comparer);
 }
Example #2
0
 /// <summary>
 /// Removes all objects from the set.
 /// </summary>
 public void Clear()
 {
     _tree = new RbTree(_comparer);
     _count = 0;
 }
Example #3
0
 public SetEnumerator(RbTree tree)
 {
     _tree = tree;
 }
Example #4
0
 /// <summary>
 /// Creates an instance of SetBase.
 /// </summary>
 /// <param name="comparer">Comparer that specifies sort order of the elements.</param>
 /// <param name="allowDuplicates">Whether multiple duplicate (equivalent) elements are allowed.</param>
 public SetBase(System.Collections.IComparer comparer, bool allowDuplicates)
 {
     _comparer = comparer;
     _allowDuplicates = allowDuplicates;
     _tree = new RbTree(_comparer);
 }
 public ReversedTree(RbTree tree)
 {
     _tree = tree;
 }
Example #6
0
 public ReversedTree(RbTree tree)
 {
     this._tree = tree;
 }