Documentation ¶
Index ¶
- func OverlappedPairs(as []Interval) (pairs [][2]int)
- type Interval
- func (a Interval) Add(d int) Interval
- func (a Interval) Contains(v int) bool
- func (a Interval) Empty() bool
- func (a Interval) Equal(b Interval) bool
- func (v Interval) MarshalText() (text []byte, err error)
- func (a Interval) Overlaps(b Interval) bool
- func (a Interval) Split(count int) []Interval
- func (a Interval) String() string
- func (a Interval) Sub(d int) Interval
- func (p *Interval) UnmarshalText(text []byte) error
- func (a Interval) Width() int
- type StringFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OverlappedPairs ¶
Types ¶
type Interval ¶
Axioms: if (min >= max) it is empty interval if interval contains x than (min <= x < max)
var ZI Interval // Zero Interval
func (Interval) MarshalText ¶
func (*Interval) UnmarshalText ¶
type StringFormatter ¶
func (StringFormatter) Format ¶
func (sf StringFormatter) Format(v Interval) string
Click to show internal directories.
Click to hide internal directories.