intervalst

package
v0.12.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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