interval

package
v0.0.0-...-c1b4e3e Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: GPL-3.0, LGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UintInterval

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

UintInterval represents an unsigned integer interval.

func NewUint

func NewUint(start uint, size uint) UintInterval

NewUint constructs a new UintInterval instance.

func (*UintInterval) Contains

func (r *UintInterval) Contains(o *UintInterval) bool

Contains returns true iff `o` is contained within the interval.

func (*UintInterval) ContainsValue

func (r *UintInterval) ContainsValue(v uint) bool

ContainsValue returns true iff the value is contained within the interval.

func (*UintInterval) End

func (r *UintInterval) End() uint

End returns the first value outside of (past) the interval. (i.e. exclusive interval end)

func (*UintInterval) Equal

func (r *UintInterval) Equal(o *UintInterval) bool

Equal returns true iff two intervals are equal.

func (*UintInterval) First

func (r *UintInterval) First() uint

First returns the start/first value within the interval.

func (*UintInterval) Last

func (r *UintInterval) Last() uint

Last returns the last value within the interval. (i.e. inclusive interval end)

func (*UintInterval) Overlaps

func (r *UintInterval) Overlaps(o *UintInterval) bool

Overlaps returns true iff there is some overlap between `o` and the interval.

func (*UintInterval) Size

func (r *UintInterval) Size() uint

Size returns the size of the interval.

func (*UintInterval) Start

func (r *UintInterval) Start() uint

Start returns the start/first value within the interval.

Jump to

Keyboard shortcuts

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