Documentation ¶
Index ¶
- type Range
- type RangeFilter
- func (irf *RangeFilter) Add(in RangeFilter)
- func (irf *RangeFilter) AddInt64(n int64)
- func (irf *RangeFilter) AddRange(in Range)
- func (irf *RangeFilter) DataSize() int64
- func (irf *RangeFilter) Has(n int64) bool
- func (irf *RangeFilter) Lacks() *RangeFilter
- func (irf *RangeFilter) Len() int
- func (irf *RangeFilter) Less(i, j int) bool
- func (irf *RangeFilter) MinMax() (int64, int64, bool)
- func (irf *RangeFilter) String() string
- func (irf *RangeFilter) Sub(in RangeFilter)
- func (irf *RangeFilter) SubRange(toSub Range)
- func (irf *RangeFilter) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Range ¶
func (*Range) IsConnected ¶
can number n can join current Range and become one Range but not 2 separate items ir [5,10] n = 3: false n = 4: true n = 5: true n = 10: true n = 11: true n = 12: false
func (*Range) IsConnectedEx ¶
func (*Range) IsOverlap ¶
is number n in current range ir [5,10] n = 3: false n = 4: false n = 5: true n = 10: true n = 11: false n = 12: false
func (*Range) IsOverlapEx ¶
type RangeFilter ¶
type RangeFilter struct {
Ranges []Range
}
func NewRangeFilter ¶
func NewRangeFilter() *RangeFilter
func NewRangeFilterEx ¶
func NewRangeFilterEx(begin, end int64) *RangeFilter
func (*RangeFilter) Add ¶
func (irf *RangeFilter) Add(in RangeFilter)
func (*RangeFilter) AddInt64 ¶
func (irf *RangeFilter) AddInt64(n int64)
func (*RangeFilter) AddRange ¶
func (irf *RangeFilter) AddRange(in Range)
func (*RangeFilter) DataSize ¶
func (irf *RangeFilter) DataSize() int64
func (*RangeFilter) Has ¶
func (irf *RangeFilter) Has(n int64) bool
func (*RangeFilter) Lacks ¶
func (irf *RangeFilter) Lacks() *RangeFilter
get not linked/connected ranges of current RangeFilter
func (*RangeFilter) Len ¶
func (irf *RangeFilter) Len() int
func (*RangeFilter) Less ¶
func (irf *RangeFilter) Less(i, j int) bool
func (*RangeFilter) String ¶
func (irf *RangeFilter) String() string
func (*RangeFilter) Sub ¶
func (irf *RangeFilter) Sub(in RangeFilter)
func (*RangeFilter) SubRange ¶
func (irf *RangeFilter) SubRange(toSub Range)
func (*RangeFilter) Swap ¶
func (irf *RangeFilter) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.