bufferediskiplist

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package bufferediskiplist provides a version of ISkipList that (i) buffers insertions at the start and end of the sequence and (ii) does not construct a skip list structure until the sequence reaches a certain length. This reduces the overhead of using an ISkipList in instances where the sequence of values is often short.

The API for BufferedISkipList is the same as for ISkipList but for one important difference in the semantics of PtrAt(). Pointers to elements in a BufferedISkiplist are **NOT** guaranteed to remain valid following subsequent mutation of the BufferedISkipList. (Any operation that adds or removes an element is a mutation; merely modifying an element's value doesn't count.)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedISkipList

type BufferedISkipList struct {
	// contains filtered or unexported fields
}

func (*BufferedISkipList) At

func (*BufferedISkipList) Clear

func (l *BufferedISkipList) Clear()

func (*BufferedISkipList) Copy

func (*BufferedISkipList) CopyRange

func (l *BufferedISkipList) CopyRange(from, to int) *BufferedISkipList

func (*BufferedISkipList) CopyRangeToSlice

func (l *BufferedISkipList) CopyRangeToSlice(from, to int, slice []iskiplist.ElemType)

func (*BufferedISkipList) CopyToSlice

func (l *BufferedISkipList) CopyToSlice(slice []iskiplist.ElemType)

func (*BufferedISkipList) ForAll

func (l *BufferedISkipList) ForAll(f func(*iskiplist.ElemType))

func (*BufferedISkipList) ForAllI

func (l *BufferedISkipList) ForAllI(f func(int, *iskiplist.ElemType))

func (*BufferedISkipList) ForAllRange

func (l *BufferedISkipList) ForAllRange(from, to int, f func(*iskiplist.ElemType))

func (*BufferedISkipList) ForAllRangeI

func (l *BufferedISkipList) ForAllRangeI(from, to int, f func(int, *iskiplist.ElemType))

func (*BufferedISkipList) Insert

func (l *BufferedISkipList) Insert(index int, elem iskiplist.ElemType)

func (*BufferedISkipList) Iterate

func (l *BufferedISkipList) Iterate(f func(*iskiplist.ElemType) bool)

func (*BufferedISkipList) IterateI

func (l *BufferedISkipList) IterateI(f func(int, *iskiplist.ElemType) bool)

func (*BufferedISkipList) IterateRange

func (l *BufferedISkipList) IterateRange(from, to int, f func(*iskiplist.ElemType) bool)

func (*BufferedISkipList) IterateRangeI

func (l *BufferedISkipList) IterateRangeI(from, to int, f func(int, *iskiplist.ElemType) bool)

func (*BufferedISkipList) Length

func (l *BufferedISkipList) Length() int

func (*BufferedISkipList) PopBack

func (l *BufferedISkipList) PopBack() (r iskiplist.ElemType, ok bool)

func (*BufferedISkipList) PopFront

func (l *BufferedISkipList) PopFront() (r iskiplist.ElemType, ok bool)

func (*BufferedISkipList) PtrAt

func (l *BufferedISkipList) PtrAt(i int) *iskiplist.ElemType

func (*BufferedISkipList) PushBack

func (l *BufferedISkipList) PushBack(elem iskiplist.ElemType)

func (*BufferedISkipList) PushFront

func (l *BufferedISkipList) PushFront(elem iskiplist.ElemType)

func (*BufferedISkipList) Remove

func (l *BufferedISkipList) Remove(index int) iskiplist.ElemType

func (*BufferedISkipList) Seed

func (l *BufferedISkipList) Seed(seed1, seed2 uint64)

func (*BufferedISkipList) SeedFrom

func (l *BufferedISkipList) SeedFrom(l2 *BufferedISkipList)

func (*BufferedISkipList) Set

func (l *BufferedISkipList) Set(i int, v iskiplist.ElemType)

func (*BufferedISkipList) Swap

func (l *BufferedISkipList) Swap(index1, index2 int)

func (*BufferedISkipList) Truncate

func (l *BufferedISkipList) Truncate(n int)

func (*BufferedISkipList) Update

func (l *BufferedISkipList) Update(i int, upd func(iskiplist.ElemType) iskiplist.ElemType)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL