SkipList<T> Class

General purpose skiplist class. A skiplist is a sorted linked list with O(logn) search time. The skiplist works like a binary tree but also have linear traversal access to the sorted elements.
Public Class SkipList(Of  _ 
T
Implements IEnumerable
This language is not supported or no code example is available.
public class SkipList<T> : IEnumerable
This language is not supported or no code example is available.
generic<typename T> 
public ref class SkipList : public IEnumerable^
This language is not supported or no code example is available.
JScript does not support generic types and methods.
This language is not supported or no code example is available.

Type Parameters

T

Name Description
Public constructor SkipList() Constructs a SkipList for T. T must have the IComparable interface.
Public constructor SkipList(Comparison<T>) Constructs a SkipList for T.
Top
Name Description
Public property Count Gets the number of elements in the list.
Public property End Gets the End node of the list.
Public property First Gets the first node in the list or End if the list is empty.
Public property Height Gets the height of the list.
Public property Last Gets the last node in the list or End if the list is empty.
Public property Probability Gets and sets the probablity between different depths of the skiplist.
Top
Methods
 
Name Description
Public method Add(T) Adds a object to the SkipList.
Public method Clear() Clears the list.
Public method Erase(SkipListNode<T>) Erases a node from the list.
Public method Erase(T) Erases the first node in the SkipList with the value val.
Public method Find(T) Finds an object in the SkipList. The search is O(logn).
Public method Find(T, Comparison<T>) Finds an object in the SkipList. The search is O(logn).
Public method GetEnumerator() Enumerator interface to be able to do foreach.
Top
IGS.Genamo.SkipList<T>

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition