Class SortedListExtensions
Extension methods to make the System.Collections.Generic.SortedList easier to use.
Inheritance
System.Object
SortedListExtensions
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: Fibula.Common.Utilities.Extensions
Assembly: Fibula.Common.Utilities.dll
Syntax
public static class SortedListExtensions
Methods
| Improve this Doc View SourceAdd(SortedList<Int32, INode>, INode)
Adds a INode to the SortedList.
Declaration
public static void Add(this SortedList<int, INode> sortedList, INode node)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.SortedList<System.Int32, INode> | sortedList | SortedList to add the node to. |
INode | node | Node to add to the sortedList. |
IsEmpty<TKey, TValue>(SortedList<TKey, TValue>)
Checks if the SortedList is empty.
Declaration
public static bool IsEmpty<TKey, TValue>(this SortedList<TKey, TValue> sortedList)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.SortedList<TKey, TValue> | sortedList | SortedList to check if it is empty. |
Returns
Type | Description |
---|---|
System.Boolean | True if sortedList is empty, false if it still has elements. |
Type Parameters
Name | Description |
---|---|
TKey | The type of key. |
TValue | The type of value. |
Pop(SortedList<Int32, INode>)
Removes the node from the sorted list with the smallest TotalCost and returns that node.
Declaration
public static INode Pop(this SortedList<int, INode> sortedList)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.SortedList<System.Int32, INode> | sortedList | SortedList to remove and return the smallest TotalCost node. |
Returns
Type | Description |
---|---|
INode | Node with the smallest TotalCost. |