interval

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

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

Go to latest
Published: Feb 2, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

区间实现

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a, b IntervalBlockIface) bool

func In

func In(a int64, b IntervalBlockIface) bool

func Include

func Include(a, b IntervalBlockIface) bool

Common function 是否包含

Types

type Interval

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

func NewInterval

func NewInterval() *Interval

func (*Interval) Add

func (this *Interval) Add(intervalB IntervalBlockIface)

插入排序

func (*Interval) DebugPrint

func (this *Interval) DebugPrint()

func (*Interval) Empty

func (this *Interval) Empty() bool

func (*Interval) Exists

func (this *Interval) Exists(intervalB IntervalBlockIface) bool

func (*Interval) Get

func (this *Interval) Get() []IntervalBlockIface

func (*Interval) In

func (this *Interval) In(b int64) bool

func (*Interval) Len

func (this *Interval) Len() int

func (*Interval) Sub

func (this *Interval) Sub(intervalB IntervalBlockIface)

type IntervalBlockIface

type IntervalBlockIface interface {
	Start() int64
	End() int64
	SetStart(start int64)
	SetEnd(end int64)
}

func Sub

a - b 的绝对值

Jump to

Keyboard shortcuts

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