ring

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	First *Elt
	Curr  *Elt
	Max   *Elt
}

func NewBuffer

func NewBuffer(vs []int) *Buffer

func (*Buffer) Append

func (b *Buffer) Append(v int)

func (*Buffer) Dump

func (b *Buffer) Dump() string

func (*Buffer) Find

func (b *Buffer) Find(v int) (*Elt, bool)

func (*Buffer) FindMax

func (b *Buffer) FindMax() *Elt

func (*Buffer) Hash

func (b *Buffer) Hash() string

func (*Buffer) Insert

func (b *Buffer) Insert(e *Elt, after *Elt)

func (*Buffer) Last

func (b *Buffer) Last() *Elt

func (*Buffer) NextToOne

func (b *Buffer) NextToOne() string

func (*Buffer) Step

func (b *Buffer) Step()

func (*Buffer) String

func (b *Buffer) String() string

func (*Buffer) TwoNextToOne

func (b *Buffer) TwoNextToOne() string

type Elt

type Elt struct {
	Value int
	Prev  *Elt
	Next  *Elt
}

func (Elt) String

func (e Elt) String(curr bool) string

Jump to

Keyboard shortcuts

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