interval

package
v0.0.0-...-8e7807a Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(l RList, p uint64) bool

func FindEnd

func FindEnd(l RList, at int, end uint64) bool

func FindStart

func FindStart(l RList, at int, start uint64) bool

func IndexOf

func IndexOf(l RList, p uint64) int

func Intersect

func Intersect(l RList, i Node) (first, count int)

func Merge

func Merge(l List, i Node)

func Remove

func Remove(l List, i Node)

func Replace

func Replace(l List, i Node)
func Search(l RList, v uint64, f func(l RList, at int, v uint64) bool) int

func Visit

func Visit(l RList, i Node, v Visitor)

Types

type ExtendedList

type ExtendedList interface {
	MergeData(index int, i Node)
}

type IntData

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

func CreateIntData

func CreateIntData(start, end int, data interface{}) IntData

func (IntData) Contains

func (t IntData) Contains(v int) bool

func (IntData) Data

func (t IntData) Data() interface{}

func (IntData) Range

func (t IntData) Range() (start, end int)

func (IntData) Span

func (t IntData) Span() (start, end uint64)

type IntDataList

type IntDataList []IntData

func (IntDataList) Cap

func (l IntDataList) Cap() int

func (IntDataList) Copy

func (l IntDataList) Copy(to, from, count int)

func (IntDataList) GetInterval

func (l IntDataList) GetInterval(index int) (start, end uint64)

func (*IntDataList) GrowTo

func (l *IntDataList) GrowTo(length, capacity int)

func (IntDataList) Len

func (l IntDataList) Len() int

func (IntDataList) MergeData

func (l IntDataList) MergeData(index int, i Node)

func (IntDataList) Overlaps

func (l IntDataList) Overlaps(i IntData) IntDataList

func (IntDataList) SetInterval

func (l IntDataList) SetInterval(index int, start, end uint64)

func (*IntDataList) SetLen

func (l *IntDataList) SetLen(len int)

type List

type List interface {
	RList
	Copy(to, from, count int)
	Cap() int
	SetLen(len int)
	GrowTo(length, capacity int)
}

type Node

type Node interface {
	Span() (start, end uint64)
}

type RList

type RList interface {
	Len() int
	GetInterval(index int) (start, end uint64)
	SetInterval(index int, start, end uint64)
}

type U64

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

func CreateU64

func CreateU64(first, count uint64) U64

func CreateU64Inc

func CreateU64Inc(first, last uint64) U64

func (U64) Contains

func (i U64) Contains(value uint64) bool

func (U64) Count

func (i U64) Count() uint64

func (U64) Expand

func (i U64) Expand(value uint64) U64

func (U64) First

func (i U64) First() uint64

func (U64) Last

func (i U64) Last() uint64

func (U64) MarshalBinary

func (i U64) MarshalBinary() ([]byte, error)

encoding.BinaryMarshaler compliance

func (U64) Range

func (i U64) Range() (start, end uint64)

func (U64) Span

func (i U64) Span() (start, end uint64)

func (U64) String

func (i U64) String() string

func (*U64) UnmarshalBinary

func (i *U64) UnmarshalBinary(data []byte) error

encoding.BinaryUnmarshaler compliance

type U64List

type U64List []U64

func (U64List) Cap

func (l U64List) Cap() int

func (U64List) Copy

func (l U64List) Copy(to, from, count int)

func (U64List) GetInterval

func (l U64List) GetInterval(index int) (start, end uint64)

func (*U64List) GrowTo

func (l *U64List) GrowTo(length, capacity int)

func (U64List) Len

func (l U64List) Len() int

func (U64List) Overlaps

func (l U64List) Overlaps(i IntData) U64List

func (U64List) SetInterval

func (l U64List) SetInterval(index int, start, end uint64)

func (*U64List) SetLen

func (l *U64List) SetLen(len int)

func (U64List) String

func (l U64List) String() string

type Visitor

type Visitor func(start, end uint64, index int)

Jump to

Keyboard shortcuts

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