Documentation ¶
Overview ¶
*
- 这是线段树的内部类,用于实现单维线段树
*
- 仅在包内使用,因此对于负无穷和正无穷的判断会省略掉
Index ¶
Constants ¶
View Source
const ( POSITIVE_INFINITY = int64(^uint64(0) >> 1) NEGATIVE_INFINITY = -POSITIVE_INFINITY - 1 )
Variables ¶
View Source
var ( RANGE_ALL = IntegerRange{Cut{NEGATIVE_INFINITY, false}, Cut{POSITIVE_INFINITY, false}} RANGE_EMPTY = IntegerRange{Cut{0, false}, Cut{0, false}} )
View Source
var ( InvalidDimension = errors.New("Invalid dimension") InsufficientIntervalLength = errors.New("Insufficient interval length") )
Functions ¶
This section is empty.
Types ¶
type EndpointType ¶
type EndpointType = int
const ( OPEN EndpointType = iota // ...) endpoint (... LEFT_CLOSED // ...) [endpoint ... RIGHT_CLOSED // ... endpoint] (... )
type ImmutableSegmentTree ¶
type ImmutableSegmentTree struct {
// contains filtered or unexported fields
}
type IntegerRange ¶
type IntegerRange struct {
// contains filtered or unexported fields
}
type SegmentTree ¶
type SegmentTree struct {
// contains filtered or unexported fields
}
func (*SegmentTree) Query ¶
func (t *SegmentTree) Query(intervals ...Interval) []Value
type SortableEndpoints ¶
type SortableEndpoints struct {
// contains filtered or unexported fields
}
func (*SortableEndpoints) Len ¶
func (s *SortableEndpoints) Len() int
func (*SortableEndpoints) Less ¶
func (s *SortableEndpoints) Less(i, j int) bool
func (*SortableEndpoints) Swap ¶
func (s *SortableEndpoints) Swap(i, j int)
type TypedEndpoint ¶
type TypedEndpoint struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.