Documentation ¶
Index ¶
- func GetBit(b byte, idx int) byte
- func Hash(bs []byte) uint64
- func Int16ToBinary(i int16) []byte
- func Int24ToBinary(i int32) []byte
- func Int32ToBinary(i int32) []byte
- func Int64ToBinary(i int64) []byte
- func Int8ToBinary(i int8) []byte
- func SearchFirstGreaterEqual(ss SequentialSequence, data int64) (idx uint32, found bool)
- func String(data interface{}) string
- type CompareResult
- type IntSequentialSequence
- type SequentialSequence
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int16ToBinary ¶
func Int24ToBinary ¶
func Int32ToBinary ¶
func Int64ToBinary ¶
func Int8ToBinary ¶
func SearchFirstGreaterEqual ¶
func SearchFirstGreaterEqual(ss SequentialSequence, data int64) (idx uint32, found bool)
搜索顺序序列中,第一个大于等于 data 的序号,返回是 [0, n] - 为空,返回 0 - 比所有值都小,返回 0 - 比所有值都大,返回 n - 至少比一个值大,但是又不是比所有的值都大,返回范围是 [1, n-1]
Types ¶
type CompareResult ¶
type CompareResult int
func (CompareResult) IsBigger ¶
func (c CompareResult) IsBigger() bool
func (CompareResult) IsEqual ¶
func (c CompareResult) IsEqual() bool
func (CompareResult) IsSmall ¶
func (c CompareResult) IsSmall() bool
type IntSequentialSequence ¶
type IntSequentialSequence []int
func (IntSequentialSequence) GetData ¶
func (r IntSequentialSequence) GetData(idx uint32) int64
func (IntSequentialSequence) Len ¶
func (r IntSequentialSequence) Len() uint32
type SequentialSequence ¶
顺序的序列 - 可以获取长度 - 可以根据偏移获取指定的值
Source Files ¶
Click to show internal directories.
Click to hide internal directories.