sort

package
v0.0.0-...-3022a63 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

package sort defines various sorting algorithms for stream * data. It supports addition and removal of elements and * provides an iterator for accessing the elements in order.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Insertion

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

func NewInsertion

func NewInsertion(less func(old, new interface{}) bool) *Insertion

func (*Insertion) Add

func (ins *Insertion) Add(v interface{})

func (*Insertion) First

func (ins *Insertion) First() *list.Element

func (*Insertion) Last

func (ins *Insertion) Last() *list.Element

func (*Insertion) Remove

func (ins *Insertion) Remove(v interface{})

func (*Insertion) Reset

func (ins *Insertion) Reset()

type Sort

type Sort interface {
	Add(v interface{})

	Remove(v interface{})

	First() *list.Element

	Last() *list.Element

	Reset()
}

Jump to

Keyboard shortcuts

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