SkipList

trait SkipList[T <: Exec[T], A, E] extends Mutable[T]
Companion
object
trait Mutable[T]
trait Disposable[T]
trait Writable
trait Identified[T]
class Object
trait Matchable
class Any
trait HASkipList[T, A, E]
trait Set[T, A]
trait Map[T, A, B]
trait Set[T, A]
trait Map[T, A, B]

Value members

Abstract methods

def +=(entry: E)(tx: T): SkipList[T, A, E]
def -=(key: A)(tx: T): SkipList[T, A, E]
def ceil(key: A)(tx: T): Option[E]

Finds the entry with the smallest key which is greater than or equal to the search key.

Finds the entry with the smallest key which is greater than or equal to the search key.

Value Params
key

the search key

Returns

the found entry, or None if there is no key greater than or equal to the search key (e.g. the list is empty)

def clear(tx: T): Unit
def contains(key: A)(tx: T): Boolean

Searches for the Branch of a given key.

Searches for the Branch of a given key.

Value Params
key

the key to search for

Returns

true if the key is in the list, false otherwise

def debugPrint(tx: T): String
def firstKey(tx: T): A
def floor(key: A)(tx: T): Option[E]

Finds the entry with the largest key which is smaller than or equal to the search key.

Finds the entry with the largest key which is smaller than or equal to the search key.

Value Params
key

the search key

Returns

the found entry, or None if there is no key smaller than or equal to the search key (e.g. the list is empty)

def head(tx: T): E

Returns the first element. Throws an exception if the list is empty.

Returns the first element. Throws an exception if the list is empty.

def headOption(tx: T): Option[E]

Returns the first element, or None if the list is empty.

Returns the first element, or None if the list is empty.

def height(tx: T): Int

The number of levels in the skip list.

The number of levels in the skip list.

def isEmpty(tx: T): Boolean
def isomorphicQuery(compare: A => Int)(tx: T): (E, Int)

Finds the nearest item equal or greater than an unknown item from an isomorphic set. The isomorphism is represented by a comparison function which guides the binary search.

Finds the nearest item equal or greater than an unknown item from an isomorphic set. The isomorphism is represented by a comparison function which guides the binary search.

Value Params
compare

a function that guides the search. should return -1 if the argument is smaller than the search key, 0 if both are equivalent, or 1 if the argument is greater than the search key. E.g., using some mapping, the function could look like mapping.apply(_).compare(queryKey)

Returns

the nearest item, or the maximum item

def iterator(tx: T): Iterator[E]
def keyFormat: TFormat[T, A]
def last(tx: T): E

Returns the last element. Throws an exception if the list is empty.

Returns the last element. Throws an exception if the list is empty.

def lastKey(tx: T): A
def lastOption(tx: T): Option[E]

Returns the last element, or None if the list is empty.

Returns the last element, or None if the list is empty.

def maxGap: Int

The maximum gap within elements of each skip level.

The maximum gap within elements of each skip level.

def minGap: Int

The minimum gap within elements of each skip level.

The minimum gap within elements of each skip level.

def nonEmpty(tx: T): Boolean
def size(tx: T): Int

Reports the number of keys in the skip list (size of the bottom level). This operation may take up to O(n) time, depending on the implementation.

Reports the number of keys in the skip list (size of the bottom level). This operation may take up to O(n) time, depending on the implementation.

def toIndexedSeq(tx: T): IndexedSeq[E]
def toList(tx: T): List[E]
def toSeq(tx: T): Seq[E]
def toSet(tx: T): Set[E]

Inherited methods

def dispose(tx: T): Unit
Inherited from
Disposable
override def equals(that: Any): Boolean
Definition Classes
Identified -> Any
Inherited from
Identified
override def hashCode: Int
Definition Classes
Identified -> Any
Inherited from
Identified
def id: Ident[T]
Inherited from
Identified
def write(out: DataOutput): Unit
Inherited from
Writable

Implicits

Implicits

implicit def ordering: TOrdering[T, A]

The ordering used for the keys of this list.

The ordering used for the keys of this list.