intervalst

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interval

type Interval struct {
	Min, Max Position
}

func NewInterval

func NewInterval(min, max Position) Interval

func (Interval) Compare

func (i Interval) Compare(other Interval) int

func (Interval) Contains

func (i Interval) Contains(x Position) bool

func (Interval) Intersects

func (i Interval) Intersects(other Interval) bool

func (Interval) String

func (i Interval) String() string

type IntervalST

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

func (*IntervalST) Contains

func (t *IntervalST) Contains(interval Interval) bool

func (*IntervalST) Get

func (t *IntervalST) Get(interval Interval) interface{}

func (*IntervalST) Put

func (t *IntervalST) Put(interval Interval, value interface{})

Put associates an interval with a value.

NOTE: does *not* check if the interval already exists

func (*IntervalST) Search

func (t *IntervalST) Search(p Position) (*Interval, interface{})

func (*IntervalST) SearchInterval

func (t *IntervalST) SearchInterval(interval Interval) (*Interval, interface{})

func (*IntervalST) Values

func (t *IntervalST) Values() []interface{}

type MinPosition

type MinPosition struct{}

func (MinPosition) Compare

func (MinPosition) Compare(other Position) int

type Position

type Position interface {
	Compare(other Position) int
}

Jump to

Keyboard shortcuts

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