Documentation ¶
Index ¶
- func BiSearch[ValueType NumberType, T Element[ValueType]](sElement []T, value ValueType, matchUp int) int
- func ClearBitwiseTag[Number BitNumber, UNumber UnsignedNumber](bitBuff []Number, bitPositionIndex UNumber) bool
- func GetBitwiseNum[Number BitNumber](bitBuff []Number) int
- func GetBitwiseTag[Number BitNumber, UNumber UnsignedNumber](bitBuff []Number, bitPositionIndex UNumber) (bool, error)
- func SetBitwiseTag[Number BitNumber, UNumber UnsignedNumber](bitBuff []Number, bitPositionIndex UNumber) bool
- type BitNumber
- type Element
- type NumberType
- type UnsignedNumber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BiSearch ¶
func BiSearch[ValueType NumberType, T Element[ValueType]](sElement []T, value ValueType, matchUp int) int
BiSearch 二分查找,切片必需有序号。matchUp表示是否向上范围查找。比如:数列10 20 30 ,当value传入25时,返回结果是2,表示落到3的范围
func ClearBitwiseTag ¶ added in v1.18.6
func ClearBitwiseTag[Number BitNumber, UNumber UnsignedNumber](bitBuff []Number, bitPositionIndex UNumber) bool
func GetBitwiseNum ¶ added in v1.18.6
func GetBitwiseTag ¶ added in v1.18.6
func GetBitwiseTag[Number BitNumber, UNumber UnsignedNumber](bitBuff []Number, bitPositionIndex UNumber) (bool, error)
func SetBitwiseTag ¶ added in v1.18.6
func SetBitwiseTag[Number BitNumber, UNumber UnsignedNumber](bitBuff []Number, bitPositionIndex UNumber) bool
Types ¶
type Element ¶
type Element[ValueType NumberType] interface { GetValue() ValueType }
type NumberType ¶
Click to show internal directories.
Click to hide internal directories.