Class SortedSet<T>
A sorted collection of unique items.
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class SortedSet<T> : IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, ICloneable
Type Parameters
Name |
Description |
T |
The item type.
|
Constructors
SortedSet()
Declaration
SortedSet(IComparer<T>)
Declaration
public SortedSet(IComparer<T> comparer)
Parameters
SortedSet(Int32, IComparer<T>)
Declaration
public SortedSet(int capacity, IComparer<T> comparer)
Parameters
Properties
Capacity
Declaration
public int Capacity { get; set; }
Property Value
Comparer
Declaration
public IComparer<T> Comparer { get; }
Property Value
Count
Declaration
public virtual int Count { get; }
Property Value
IsReadOnly
Declaration
public virtual bool IsReadOnly { get; }
Property Value
Item[Int32]
Declaration
public T this[int index] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
Methods
Add(T)
Declaration
public virtual void Add(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
AddRange(IEnumerable<T>)
Add all items in a collection.
Declaration
public void AddRange(IEnumerable<T> list)
Parameters
Clear()
Declaration
public virtual void Clear()
Clone()
Declaration
Returns
Contains(T)
Declaration
public virtual bool Contains(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
Contains(IList<T>)
Test membership of all items in a collection.
Declaration
public IList<bool> Contains(IList<T> list)
Parameters
Type |
Name |
Description |
IList<T> |
list |
|
Returns
Type |
Description |
IList<Boolean> |
result[i] is true iff the set contains list[i].
|
ContainsAny(IEnumerable<T>)
Test membership of all items in a collection.
Declaration
public bool ContainsAny(IEnumerable<T> list)
Parameters
Returns
Type |
Description |
Boolean |
true if the set contains any item in list.
|
CopyTo(T[], Int32)
Declaration
public virtual void CopyTo(T[] array, int index)
Parameters
Type |
Name |
Description |
T[] |
array |
|
Int32 |
index |
|
Equals(Object)
Declaration
public override bool Equals(object that)
Parameters
Type |
Name |
Description |
Object |
that |
|
Returns
Overrides
Declaration
public static SortedSet<T> FromEnumerable(IComparer<T> comparer, IEnumerable<T> collection)
Parameters
Returns
Declaration
public static SortedSet<T> FromEnumerable(IEnumerable<T> collection)
Parameters
Returns
GetEnumerator()
Declaration
public virtual IEnumerator<T> GetEnumerator()
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
IndexOf(T)
Declaration
public int IndexOf(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
Insert(Int32, T)
Declaration
public void Insert(int index, T item)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
T |
item |
|
Intersection(SortedSet<T>, SortedSet<T>)
Declaration
public static SortedSet<T> Intersection(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
Remove(T)
Declaration
public virtual bool Remove(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
Remove(IEnumerable<T>)
Remove all items in a collection.
Declaration
public void Remove(IEnumerable<T> list)
Parameters
RemoveAt(Int32)
Declaration
public void RemoveAt(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
ToString()
Declaration
public override string ToString()
Returns
Overrides
Union(SortedSet<T>, SortedSet<T>)
Declaration
public static SortedSet<T> Union(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
Operators
BitwiseAnd(SortedSet<T>, SortedSet<T>)
Declaration
public static SortedSet<T> operator &(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
BitwiseOr(SortedSet<T>, SortedSet<T>)
Declaration
public static SortedSet<T> operator |(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
Equality(SortedSet<T>, SortedSet<T>)
Declaration
public static bool operator ==(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
GreaterThan(SortedSet<T>, SortedSet<T>)
Declaration
public static bool operator>(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
GreaterThanOrEqual(SortedSet<T>, SortedSet<T>)
Declaration
public static bool operator >=(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
Type |
Description |
Boolean |
True iff a is equal to or a superset of b.
|
Inequality(SortedSet<T>, SortedSet<T>)
Declaration
public static bool operator !=(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
LessThan(SortedSet<T>, SortedSet<T>)
Declaration
public static bool operator <(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
LessThanOrEqual(SortedSet<T>, SortedSet<T>)
Declaration
public static bool operator <=(SortedSet<T> a, SortedSet<T> b)
Parameters
Returns
Type |
Description |
Boolean |
True iff a is equal to or a subset of b.
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements
Extension Methods
IEnumerableExensions.ListZip<TFirst, TSecond, TThird, TFourth, TResult>(IList<TFirst>, IList<TSecond>, IList<TThird>, IList<TFourth>, Func<TFirst, TSecond, TThird, TFourth, TResult>)