segmenttree

package
v0.0.0-...-db1a295 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

README

为什么开辟容量为4n的数组

  1. 线段树除最后一层外,可以看作是一个满二叉树
  2. 倒数第二层的节点树可记为n(接近n)
  3. 那么[第一层, 倒数第二层)的节点总数为n-1
  4. 得到[第一层, 倒数第一层)的节点总数为2n-1
  5. 如果使用数组来存储,那么考虑到最后一层在最坏情况下为2n个点,因此有4n-1个点
  6. 所以需要开辟容量为4n的数组

查询时间复杂度为什么是log(n)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIndexIllegal = errors.New("index is illegal")
)

Functions

This section is empty.

Types

type Float32Merger

type Float32Merger func(float32, float32) float32

Float32Merger 用户自定义区间内操作逻辑

type Float32Optimization

type Float32Optimization func(int, int, float32) float32

type Float32SegmentTree

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

Float32SegmentTree 线段树

func NewFloat32SegmentTree

func NewFloat32SegmentTree(array []float32, merge Float32Merger) *Float32SegmentTree

NewFloat32SegmentTree new Float32SegmentTree

func (*Float32SegmentTree) AddValueLazy

func (s *Float32SegmentTree) AddValueLazy(addLeft int, addRight int, value float32) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Float32SegmentTree) Get

func (s *Float32SegmentTree) Get(idx int) (float32, error)

Get 索引原数组值

func (*Float32SegmentTree) Query

func (s *Float32SegmentTree) Query(queryLeft int, queryRight int) (float32, error)

Query 区间查询

func (*Float32SegmentTree) QueryLazy

func (s *Float32SegmentTree) QueryLazy(queryLeft int, queryRight int) (float32, error)

QueryLazy 懒惰查询

func (*Float32SegmentTree) Set

func (s *Float32SegmentTree) Set(index int, e float32) error

Set 更新元素值

func (*Float32SegmentTree) Size

func (s *Float32SegmentTree) Size() int

Size 线段树元素数

func (*Float32SegmentTree) WithFloat32Optimization

func (s *Float32SegmentTree) WithFloat32Optimization(f Float32Optimization)

WithFloat32Optimization 指定Float32Optimization来自定义区间[left, right]更新value的计算操作

type Float64Merger

type Float64Merger func(float64, float64) float64

Float64Merger 用户自定义区间内操作逻辑

type Float64Optimization

type Float64Optimization func(int, int, float64) float64

type Float64SegmentTree

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

Float64SegmentTree 线段树

func NewFloat64SegmentTree

func NewFloat64SegmentTree(array []float64, merge Float64Merger) *Float64SegmentTree

NewFloat64SegmentTree new Float64SegmentTree

func (*Float64SegmentTree) AddValueLazy

func (s *Float64SegmentTree) AddValueLazy(addLeft int, addRight int, value float64) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Float64SegmentTree) Get

func (s *Float64SegmentTree) Get(idx int) (float64, error)

Get 索引原数组值

func (*Float64SegmentTree) Query

func (s *Float64SegmentTree) Query(queryLeft int, queryRight int) (float64, error)

Query 区间查询

func (*Float64SegmentTree) QueryLazy

func (s *Float64SegmentTree) QueryLazy(queryLeft int, queryRight int) (float64, error)

QueryLazy 懒惰查询

func (*Float64SegmentTree) Set

func (s *Float64SegmentTree) Set(index int, e float64) error

Set 更新元素值

func (*Float64SegmentTree) Size

func (s *Float64SegmentTree) Size() int

Size 线段树元素数

func (*Float64SegmentTree) WithFloat64Optimization

func (s *Float64SegmentTree) WithFloat64Optimization(f Float64Optimization)

WithFloat64Optimization 指定Float64Optimization来自定义区间[left, right]更新value的计算操作

type Int16Merger

type Int16Merger func(int16, int16) int16

Int16Merger 用户自定义区间内操作逻辑

type Int16Optimization

type Int16Optimization func(int, int, int16) int16

type Int16SegmentTree

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

Int16SegmentTree 线段树

func NewInt16SegmentTree

func NewInt16SegmentTree(array []int16, merge Int16Merger) *Int16SegmentTree

NewInt16SegmentTree new Int16SegmentTree

func (*Int16SegmentTree) AddValueLazy

func (s *Int16SegmentTree) AddValueLazy(addLeft int, addRight int, value int16) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Int16SegmentTree) Get

func (s *Int16SegmentTree) Get(idx int) (int16, error)

Get 索引原数组值

func (*Int16SegmentTree) Query

func (s *Int16SegmentTree) Query(queryLeft int, queryRight int) (int16, error)

Query 区间查询

func (*Int16SegmentTree) QueryLazy

func (s *Int16SegmentTree) QueryLazy(queryLeft int, queryRight int) (int16, error)

QueryLazy 懒惰查询

func (*Int16SegmentTree) Set

func (s *Int16SegmentTree) Set(index int, e int16) error

Set 更新元素值

func (*Int16SegmentTree) Size

func (s *Int16SegmentTree) Size() int

Size 线段树元素数

func (*Int16SegmentTree) WithInt16Optimization

func (s *Int16SegmentTree) WithInt16Optimization(f Int16Optimization)

WithInt16Optimization 指定Int16Optimization来自定义区间[left, right]更新value的计算操作

type Int32Merger

type Int32Merger func(int32, int32) int32

Int32Merger 用户自定义区间内操作逻辑

type Int32Optimization

type Int32Optimization func(int, int, int32) int32

type Int32SegmentTree

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

Int32SegmentTree 线段树

func NewInt32SegmentTree

func NewInt32SegmentTree(array []int32, merge Int32Merger) *Int32SegmentTree

NewInt32SegmentTree new Int32SegmentTree

func (*Int32SegmentTree) AddValueLazy

func (s *Int32SegmentTree) AddValueLazy(addLeft int, addRight int, value int32) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Int32SegmentTree) Get

func (s *Int32SegmentTree) Get(idx int) (int32, error)

Get 索引原数组值

func (*Int32SegmentTree) Query

func (s *Int32SegmentTree) Query(queryLeft int, queryRight int) (int32, error)

Query 区间查询

func (*Int32SegmentTree) QueryLazy

func (s *Int32SegmentTree) QueryLazy(queryLeft int, queryRight int) (int32, error)

QueryLazy 懒惰查询

func (*Int32SegmentTree) Set

func (s *Int32SegmentTree) Set(index int, e int32) error

Set 更新元素值

func (*Int32SegmentTree) Size

func (s *Int32SegmentTree) Size() int

Size 线段树元素数

func (*Int32SegmentTree) WithInt32Optimization

func (s *Int32SegmentTree) WithInt32Optimization(f Int32Optimization)

WithInt32Optimization 指定Int32Optimization来自定义区间[left, right]更新value的计算操作

type Int64Merger

type Int64Merger func(int64, int64) int64

Int64Merger 用户自定义区间内操作逻辑

type Int64Optimization

type Int64Optimization func(int, int, int64) int64

type Int64SegmentTree

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

Int64SegmentTree 线段树

func NewInt64SegmentTree

func NewInt64SegmentTree(array []int64, merge Int64Merger) *Int64SegmentTree

NewInt64SegmentTree new Int64SegmentTree

func (*Int64SegmentTree) AddValueLazy

func (s *Int64SegmentTree) AddValueLazy(addLeft int, addRight int, value int64) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Int64SegmentTree) Get

func (s *Int64SegmentTree) Get(idx int) (int64, error)

Get 索引原数组值

func (*Int64SegmentTree) Query

func (s *Int64SegmentTree) Query(queryLeft int, queryRight int) (int64, error)

Query 区间查询

func (*Int64SegmentTree) QueryLazy

func (s *Int64SegmentTree) QueryLazy(queryLeft int, queryRight int) (int64, error)

QueryLazy 懒惰查询

func (*Int64SegmentTree) Set

func (s *Int64SegmentTree) Set(index int, e int64) error

Set 更新元素值

func (*Int64SegmentTree) Size

func (s *Int64SegmentTree) Size() int

Size 线段树元素数

func (*Int64SegmentTree) WithInt64Optimization

func (s *Int64SegmentTree) WithInt64Optimization(f Int64Optimization)

WithInt64Optimization 指定Int64Optimization来自定义区间[left, right]更新value的计算操作

type IntMerger

type IntMerger func(int, int) int

IntMerger 用户自定义区间内操作逻辑

type IntOptimization

type IntOptimization func(int, int, int) int

type IntSegmentTree

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

IntSegmentTree 线段树

func NewIntSegmentTree

func NewIntSegmentTree(array []int, merge IntMerger) *IntSegmentTree

NewIntSegmentTree new IntSegmentTree

func (*IntSegmentTree) AddValueLazy

func (s *IntSegmentTree) AddValueLazy(addLeft int, addRight int, value int) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*IntSegmentTree) Get

func (s *IntSegmentTree) Get(idx int) (int, error)

Get 索引原数组值

func (*IntSegmentTree) Query

func (s *IntSegmentTree) Query(queryLeft int, queryRight int) (int, error)

Query 区间查询

func (*IntSegmentTree) QueryLazy

func (s *IntSegmentTree) QueryLazy(queryLeft int, queryRight int) (int, error)

QueryLazy 懒惰查询

func (*IntSegmentTree) Set

func (s *IntSegmentTree) Set(index int, e int) error

Set 更新元素值

func (*IntSegmentTree) Size

func (s *IntSegmentTree) Size() int

Size 线段树元素数

func (*IntSegmentTree) WithIntOptimization

func (s *IntSegmentTree) WithIntOptimization(f IntOptimization)

WithIntOptimization 指定IntOptimization来自定义区间[left, right]更新value的计算操作

type InterfaceMerger

type InterfaceMerger func(interface{}, interface{}) interface{}

InterfaceMerger 用户自定义区间内操作逻辑

type InterfaceOptimization

type InterfaceOptimization func(int, int, interface{}) interface{}

type InterfaceSegmentTree

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

InterfaceSegmentTree 线段树

func NewInterfaceSegmentTree

func NewInterfaceSegmentTree(array []interface{}, merge InterfaceMerger) *InterfaceSegmentTree

NewInterfaceSegmentTree new InterfaceSegmentTree

func (*InterfaceSegmentTree) AddValueLazy

func (s *InterfaceSegmentTree) AddValueLazy(addLeft int, addRight int, value interface{}) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*InterfaceSegmentTree) Get

func (s *InterfaceSegmentTree) Get(idx int) (interface{}, error)

Get 索引原数组值

func (*InterfaceSegmentTree) Query

func (s *InterfaceSegmentTree) Query(queryLeft int, queryRight int) (interface{}, error)

Query 区间查询

func (*InterfaceSegmentTree) QueryLazy

func (s *InterfaceSegmentTree) QueryLazy(queryLeft int, queryRight int) (interface{}, error)

QueryLazy 懒惰查询

func (*InterfaceSegmentTree) Set

func (s *InterfaceSegmentTree) Set(index int, e interface{}) error

Set 更新元素值

func (*InterfaceSegmentTree) Size

func (s *InterfaceSegmentTree) Size() int

Size 线段树元素数

func (*InterfaceSegmentTree) WithInterfaceOptimization

func (s *InterfaceSegmentTree) WithInterfaceOptimization(f InterfaceOptimization)

WithInterfaceOptimization 指定InterfaceOptimization来自定义区间[left, right]更新value的计算操作

type StringMerger

type StringMerger func(string, string) string

StringMerger 用户自定义区间内操作逻辑

type StringOptimization

type StringOptimization func(int, int, string) string

type StringSegmentTree

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

StringSegmentTree 线段树

func NewStringSegmentTree

func NewStringSegmentTree(array []string, merge StringMerger) *StringSegmentTree

NewStringSegmentTree new StringSegmentTree

func (*StringSegmentTree) AddValueLazy

func (s *StringSegmentTree) AddValueLazy(addLeft int, addRight int, value string) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*StringSegmentTree) Get

func (s *StringSegmentTree) Get(idx int) (string, error)

Get 索引原数组值

func (*StringSegmentTree) Query

func (s *StringSegmentTree) Query(queryLeft int, queryRight int) (string, error)

Query 区间查询

func (*StringSegmentTree) QueryLazy

func (s *StringSegmentTree) QueryLazy(queryLeft int, queryRight int) (string, error)

QueryLazy 懒惰查询

func (*StringSegmentTree) Set

func (s *StringSegmentTree) Set(index int, e string) error

Set 更新元素值

func (*StringSegmentTree) Size

func (s *StringSegmentTree) Size() int

Size 线段树元素数

func (*StringSegmentTree) WithStringOptimization

func (s *StringSegmentTree) WithStringOptimization(f StringOptimization)

WithStringOptimization 指定StringOptimization来自定义区间[left, right]更新value的计算操作

type Uint16Merger

type Uint16Merger func(uint16, uint16) uint16

Uint16Merger 用户自定义区间内操作逻辑

type Uint16Optimization

type Uint16Optimization func(int, int, uint16) uint16

type Uint16SegmentTree

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

Uint16SegmentTree 线段树

func NewUint16SegmentTree

func NewUint16SegmentTree(array []uint16, merge Uint16Merger) *Uint16SegmentTree

NewUint16SegmentTree new Uint16SegmentTree

func (*Uint16SegmentTree) AddValueLazy

func (s *Uint16SegmentTree) AddValueLazy(addLeft int, addRight int, value uint16) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Uint16SegmentTree) Get

func (s *Uint16SegmentTree) Get(idx int) (uint16, error)

Get 索引原数组值

func (*Uint16SegmentTree) Query

func (s *Uint16SegmentTree) Query(queryLeft int, queryRight int) (uint16, error)

Query 区间查询

func (*Uint16SegmentTree) QueryLazy

func (s *Uint16SegmentTree) QueryLazy(queryLeft int, queryRight int) (uint16, error)

QueryLazy 懒惰查询

func (*Uint16SegmentTree) Set

func (s *Uint16SegmentTree) Set(index int, e uint16) error

Set 更新元素值

func (*Uint16SegmentTree) Size

func (s *Uint16SegmentTree) Size() int

Size 线段树元素数

func (*Uint16SegmentTree) WithUint16Optimization

func (s *Uint16SegmentTree) WithUint16Optimization(f Uint16Optimization)

WithUint16Optimization 指定Uint16Optimization来自定义区间[left, right]更新value的计算操作

type Uint32Merger

type Uint32Merger func(uint32, uint32) uint32

Uint32Merger 用户自定义区间内操作逻辑

type Uint32Optimization

type Uint32Optimization func(int, int, uint32) uint32

type Uint32SegmentTree

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

Uint32SegmentTree 线段树

func NewUint32SegmentTree

func NewUint32SegmentTree(array []uint32, merge Uint32Merger) *Uint32SegmentTree

NewUint32SegmentTree new Uint32SegmentTree

func (*Uint32SegmentTree) AddValueLazy

func (s *Uint32SegmentTree) AddValueLazy(addLeft int, addRight int, value uint32) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Uint32SegmentTree) Get

func (s *Uint32SegmentTree) Get(idx int) (uint32, error)

Get 索引原数组值

func (*Uint32SegmentTree) Query

func (s *Uint32SegmentTree) Query(queryLeft int, queryRight int) (uint32, error)

Query 区间查询

func (*Uint32SegmentTree) QueryLazy

func (s *Uint32SegmentTree) QueryLazy(queryLeft int, queryRight int) (uint32, error)

QueryLazy 懒惰查询

func (*Uint32SegmentTree) Set

func (s *Uint32SegmentTree) Set(index int, e uint32) error

Set 更新元素值

func (*Uint32SegmentTree) Size

func (s *Uint32SegmentTree) Size() int

Size 线段树元素数

func (*Uint32SegmentTree) WithUint32Optimization

func (s *Uint32SegmentTree) WithUint32Optimization(f Uint32Optimization)

WithUint32Optimization 指定Uint32Optimization来自定义区间[left, right]更新value的计算操作

type Uint64Merger

type Uint64Merger func(uint64, uint64) uint64

Uint64Merger 用户自定义区间内操作逻辑

type Uint64Optimization

type Uint64Optimization func(int, int, uint64) uint64

type Uint64SegmentTree

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

Uint64SegmentTree 线段树

func NewUint64SegmentTree

func NewUint64SegmentTree(array []uint64, merge Uint64Merger) *Uint64SegmentTree

NewUint64SegmentTree new Uint64SegmentTree

func (*Uint64SegmentTree) AddValueLazy

func (s *Uint64SegmentTree) AddValueLazy(addLeft int, addRight int, value uint64) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*Uint64SegmentTree) Get

func (s *Uint64SegmentTree) Get(idx int) (uint64, error)

Get 索引原数组值

func (*Uint64SegmentTree) Query

func (s *Uint64SegmentTree) Query(queryLeft int, queryRight int) (uint64, error)

Query 区间查询

func (*Uint64SegmentTree) QueryLazy

func (s *Uint64SegmentTree) QueryLazy(queryLeft int, queryRight int) (uint64, error)

QueryLazy 懒惰查询

func (*Uint64SegmentTree) Set

func (s *Uint64SegmentTree) Set(index int, e uint64) error

Set 更新元素值

func (*Uint64SegmentTree) Size

func (s *Uint64SegmentTree) Size() int

Size 线段树元素数

func (*Uint64SegmentTree) WithUint64Optimization

func (s *Uint64SegmentTree) WithUint64Optimization(f Uint64Optimization)

WithUint64Optimization 指定Uint64Optimization来自定义区间[left, right]更新value的计算操作

type UintMerger

type UintMerger func(uint, uint) uint

UintMerger 用户自定义区间内操作逻辑

type UintOptimization

type UintOptimization func(int, int, uint) uint

type UintSegmentTree

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

UintSegmentTree 线段树

func NewUintSegmentTree

func NewUintSegmentTree(array []uint, merge UintMerger) *UintSegmentTree

NewUintSegmentTree new UintSegmentTree

func (*UintSegmentTree) AddValueLazy

func (s *UintSegmentTree) AddValueLazy(addLeft int, addRight int, value uint) error

AddValueLazy 给[addLeft....addRight]位置的值都加上value 注意这里的更新值是在原来值的基础上增加或者减少,而不是把这个区间内的值都赋值为 x,区间更新和单点更新不同 这里的区间更新关注的是变化,单点更新关注的是定值 当然区间更新也可以都更新成定值,如果只区间更新成定值,那么 lazy 更新策略需要变化,merge 策略也需要变化,这里暂不详细讨论

func (*UintSegmentTree) Get

func (s *UintSegmentTree) Get(idx int) (uint, error)

Get 索引原数组值

func (*UintSegmentTree) Query

func (s *UintSegmentTree) Query(queryLeft int, queryRight int) (uint, error)

Query 区间查询

func (*UintSegmentTree) QueryLazy

func (s *UintSegmentTree) QueryLazy(queryLeft int, queryRight int) (uint, error)

QueryLazy 懒惰查询

func (*UintSegmentTree) Set

func (s *UintSegmentTree) Set(index int, e uint) error

Set 更新元素值

func (*UintSegmentTree) Size

func (s *UintSegmentTree) Size() int

Size 线段树元素数

func (*UintSegmentTree) WithUintOptimization

func (s *UintSegmentTree) WithUintOptimization(f UintOptimization)

WithUintOptimization 指定UintOptimization来自定义区间[left, right]更新value的计算操作

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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