sortedslice

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

README

sortedslice

This package provides a sorted slice, maintaining order using binary search.

Documentation.

License: GPL-3


Documentation

Overview

(TOC) This package provides a sorted slice, maintaining order using binary search.

Index

Constants

This section is empty.

Variables

View Source
var Version string

Functions

This section is empty.

Types

type SortedSlice

type SortedSlice[E cmp.Ordered] struct {
	// contains filtered or unexported fields
}

func New

func New[E cmp.Ordered](capacity int) SortedSlice[E]

func (*SortedSlice[E]) All

func (me *SortedSlice[E]) All() iter.Seq2[int, E]

func (*SortedSlice[E]) Delete

func (me *SortedSlice[E]) Delete(element E) bool

func (*SortedSlice[E]) Equal

func (me *SortedSlice[E]) Equal(other SortedSlice[E]) bool

func (*SortedSlice[E]) Find

func (me *SortedSlice[E]) Find(element E) int

func (*SortedSlice[E]) Insert

func (me *SortedSlice[E]) Insert(element E) bool

func (*SortedSlice[E]) Len

func (me *SortedSlice[E]) Len() int

Jump to

Keyboard shortcuts

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