Class PartialOrderedSet<TValue>
A partial ordered set.
Inheritance
System.Object
PartialOrderedSet<TValue>
Implements
System.Collections.Generic.IEnumerable<TValue>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Sets
Assembly: Kephas.Core.dll
Syntax
public class PartialOrderedSet<TValue> : IEnumerable<TValue>, IEnumerable
Type Parameters
| Name | Description |
|---|---|
| TValue | The type of the set values. |
Constructors
| Improve this Doc View SourcePartialOrderedSet(IEnumerable<TValue>, Func<TValue, TValue, Nullable<Int32>>)
Initializes a new instance of the PartialOrderedSet<TValue> class.
Declaration
public PartialOrderedSet(IEnumerable<TValue> values, Func<TValue, TValue, int? > partialComparer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<TValue> | values | The values. |
| System.Func<TValue, TValue, System.Nullable<System.Int32>> | partialComparer | The partial comparer function. |
Methods
| Improve this Doc View SourceCompare(TValue, TValue)
Compares two TValue objects to determine their relative ordering.
Declaration
public int? Compare(TValue value1, TValue value2)
Parameters
| Type | Name | Description |
|---|---|---|
| TValue | value1 | First value to be compared. |
| TValue | value2 | Second value to be compared. |
Returns
| Type | Description |
|---|---|
| System.Nullable<System.Int32> | Negative if 'value1' is less than 'value2', 0 if they are equal, positive if it is greater, or |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<TValue> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<TValue> | An enumerator that can be used to iterate through the collection. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable