sliceutils

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: 2 Imported by: 1

Documentation

Overview

Package sliceutils is an internal package used by github.com/addrummond/iskiplist.

Index

Constants

View Source
const (
	OpInsert = iota
	OpRemove
	OpSwap
)

Variables

This section is empty.

Functions

func ApplyOpToSlice

func ApplyOpToSlice(op *Op, a *[]elemType)

func PrintOp

func PrintOp(op *Op) string

func SliceInsert

func SliceInsert(a *[]elemType, index int, elem elemType)

func SliceRemove

func SliceRemove(a *[]elemType, index int) elemType

func SliceSwap

func SliceSwap(a *[]elemType, index1, index2 int)

Types

type Op

type Op struct {
	Kind   OpKind
	Index1 int
	Index2 int
	Elem   elemType
}

func GenOps

func GenOps(n int, initialLength int) []Op

func GenOpsWithLotsOfPushing

func GenOpsWithLotsOfPushing(n int, initialLength int) []Op

type OpKind

type OpKind int

Jump to

Keyboard shortcuts

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