bitmap1024

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	L16  = 16
	B64  = 64
	L128 = 128
)
View Source
const (
	C1K = 1024
)
View Source
const (
	MaxU32TipStart uint32 = math.MaxUint32 / C1K
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BigU32

type BigU32 struct {
	Start uint32
	B1024 Bit1024
}

BigU32 combine uint32 and 1024

func NewBigU32

func NewBigU32() *BigU32

NewBigU32 : new big u32

func NewBigU32FromData

func NewBigU32FromData(start uint32, buf []byte) (*BigU32, error)

NewBigU32FromData : new big u32 from uint32 and []byte

func NewBigU32FromI64

func NewBigU32FromI64(i64 int64) (*BigU32, error)

NewBigU32FromI64 : new big u32 from int64

func (*BigU32) GetNAsI64

func (b *BigU32) GetNAsI64(n int) []int64

GetNAsI64 : iterate bitmap input: n -- iter count return: actually iter list

func (*BigU32) IterAsI64

func (b *BigU32) IterAsI64(s []int64, pos int, n int) int

IterAsI64 : iterate bitmap input: s -- an int64 array, pos -- slice position, n -- iter count return: actually iter count

func (*BigU32) RGetNAsI64

func (b *BigU32) RGetNAsI64(n int) []int64

RGetNAsI64 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (*BigU32) RIterAsI64

func (b *BigU32) RIterAsI64(s []int64, pos int, n int) int

RIterAsI64 : reverse iterate bitmap input: s -- an int64 array, pos -- slice position, n -- iter count return: actually iter count

func (*BigU32) Reverse

func (b *BigU32) Reverse() *BigU32

Reverse : reverse bit

func (*BigU32) SetI64

func (b *BigU32) SetI64(i64 int64) error

SetI64 set int64

type BigU32s

type BigU32s []*BigU32

BigU32s BigU32 list

func (BigU32s) GetNAsI64

func (b BigU32s) GetNAsI64(n int) []int64

GetNAsI64 : iterate bitmap input: n -- iter count return: actually iter list

func (BigU32s) RGetNAsI64

func (b BigU32s) RGetNAsI64(n int) []int64

RGetNAsI64 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (BigU32s) Reverse

func (b BigU32s) Reverse() BigU32s

Reverse : clone and reverse bit

type Bit64

type Bit64 uint64

Bit64 uint64 as bitmap

func (Bit64) And

func (b Bit64) And(c Bit64) Bit64

And : and

func (Bit64) Full

func (b Bit64) Full() bool

Full : is full set

func (Bit64) GetNAsI8

func (b Bit64) GetNAsI8(n int) []int8

GetNAsI8 : iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) GetNAsI16

func (b Bit64) GetNAsI16(n int) []int16

GetNAsI16 : iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) GetNAsI32

func (b Bit64) GetNAsI32(n int) []int32

GetNAsI32 : iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) GetNAsI64

func (b Bit64) GetNAsI64(n int) []int64

GetNAsI64 : iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) IterAsI8

func (b Bit64) IterAsI8(s []int8, pos int, add int8, n int) int

IterAsI8 : iterate bitmap input: s -- an int8 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) IterAsI16

func (b Bit64) IterAsI16(s []int16, pos int, add int16, n int) int

IterAsI16 : iterate bitmap input: s -- an int16 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) IterAsI32

func (b Bit64) IterAsI32(s []int32, pos int, add int32, n int) int

IterAsI32 : iterate bitmap input: s -- an int32 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) IterAsI64

func (b Bit64) IterAsI64(s []int64, pos int, add int64, n int) int

IterAsI64 : iterate bitmap input: s -- an int64 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) IterAsU32

func (b Bit64) IterAsU32(s []uint32, pos int, add uint32, n int) int

IterAsU32 : iterate bitmap input: s -- an uint32 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) Len

func (b Bit64) Len() int

Len : length of set bit

func (Bit64) NLen

func (b Bit64) NLen() int

NLen : length of not set bit

func (Bit64) Or

func (b Bit64) Or(c Bit64) Bit64

Or : or

func (Bit64) RGetNAsI8

func (b Bit64) RGetNAsI8(n int) []int8

RGetNAsI8 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) RGetNAsI16

func (b Bit64) RGetNAsI16(n int) []int16

RGetNAsI16 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) RGetNAsI32

func (b Bit64) RGetNAsI32(n int) []int32

RGetNAsI32 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) RGetNAsI64

func (b Bit64) RGetNAsI64(n int) []int64

RGetNAsI64 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (Bit64) RIterAsI8

func (b Bit64) RIterAsI8(s []int8, pos int, add int8, n int) int

RIterAsI8 : reverse iterate bitmap input: s -- an int8 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) RIterAsI16

func (b Bit64) RIterAsI16(s []int16, pos int, add int16, n int) int

RIterAsI16 : reverse iterate bitmap input: s -- an int16 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) RIterAsI32

func (b Bit64) RIterAsI32(s []int32, pos int, add int32, n int) int

RIterAsI32 : reverse iterate bitmap input: s -- an int32 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) RIterAsI64

func (b Bit64) RIterAsI64(s []int64, pos int, add int64, n int) int

RIterAsI64 : reverse iterate bitmap input: s -- an int64 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) RIterAsU32

func (b Bit64) RIterAsU32(s []uint32, pos int, add uint32, n int) int

RIterAsU32 : reverse iterate bitmap input: s -- an uint32 array, add -- added number, n -- iter count return: actually iter count

func (Bit64) Reverse

func (b Bit64) Reverse() Bit64

Reverse : reverse

func (*Bit64) Set

func (b *Bit64) Set(i byte)

Set : set bit

func (*Bit64) Unset

func (b *Bit64) Unset(i byte)

Unset : unset bit

type Bit1024

type Bit1024 []Bit64

Bit1024 : 16*8 = 128bytes

func NewBit1024

func NewBit1024() Bit1024

NewBit1024 : new bit 1024

func (Bit1024) And

func (b Bit1024) And(c Bit1024) Bit1024

And : and

func (Bit1024) Equal

func (b Bit1024) Equal(c Bit1024) bool

Equal : equal other

func (Bit1024) GetNAsI16

func (b Bit1024) GetNAsI16(n int) []int16

GetNAsI16 : iterate bitmap input: n -- iter count return: actually iter list

func (Bit1024) GetNAsI32

func (b Bit1024) GetNAsI32(n int) []int32

GetNAsI32 : iterate bitmap input: n -- iter count return: actually iter list

func (Bit1024) GetNAsI64

func (b Bit1024) GetNAsI64(n int) []int64

GetNAsI64 : iterate bitmap input: n -- iter count return: actually iter list

func (Bit1024) IterAsI16

func (b Bit1024) IterAsI16(s []int16, pos int, add int16, n int) int

IterAsI16 : iterate bitmap input: s -- an int32 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) IterAsI32

func (b Bit1024) IterAsI32(s []int32, pos int, add int32, n int) int

IterAsI32 : iterate bitmap input: s -- an int32 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) IterAsI64

func (b Bit1024) IterAsI64(s []int64, pos int, add int64, n int) int

IterAsI64 : iterate bitmap input: s -- an int64 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) IterAsU32

func (b Bit1024) IterAsU32(s []uint32, pos int, add uint32, n int) int

IterAsU32 : iterate bitmap input: s -- an uint32 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) Len

func (b Bit1024) Len() int

Len : length of set bit

func (Bit1024) Marshal

func (b Bit1024) Marshal() []byte

Marshal : marshal bitmap

func (Bit1024) NLen

func (b Bit1024) NLen() int

func (Bit1024) Or

func (b Bit1024) Or(c Bit1024) Bit1024

Or : or

func (Bit1024) OrThenReverse

func (b Bit1024) OrThenReverse(c Bit1024) Bit1024

OrThenReverse : or operation then reverse

func (Bit1024) RGetNAsI16

func (b Bit1024) RGetNAsI16(n int) []int16

RGetNAsI16 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (Bit1024) RGetNAsI32

func (b Bit1024) RGetNAsI32(n int) []int32

RGetNAsI32 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (Bit1024) RGetNAsI64

func (b Bit1024) RGetNAsI64(n int) []int64

RGetNAsI64 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (Bit1024) RIterAsI16

func (b Bit1024) RIterAsI16(s []int16, pos int, add int16, n int) int

RIterAsI16 : reverse iterate bitmap input: s -- an int32 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) RIterAsI32

func (b Bit1024) RIterAsI32(s []int32, pos int, add int32, n int) int

RIterAsI32 : reverse iterate bitmap input: s -- an int32 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) RIterAsI64

func (b Bit1024) RIterAsI64(s []int64, pos int, add int64, n int) int

RIterAsI64 : reverse iterate bitmap input: s -- an int64 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) RIterAsU32

func (b Bit1024) RIterAsU32(s []uint32, pos int, add uint32, n int) int

RIterAsU32 : reverse iterate bitmap input: s -- an uint32 array, add -- added number, n -- iter count return: actually iter count

func (Bit1024) Reverse

func (b Bit1024) Reverse() Bit1024

Reverse : reverse

func (Bit1024) SetI16

func (b Bit1024) SetI16(i int16)

SetI16 : set bit

func (Bit1024) SetI32

func (b Bit1024) SetI32(i int32)

SetI32 : set bit

func (Bit1024) Unmarshal

func (b Bit1024) Unmarshal(buf []byte) error

Unmarshal : unmarshal bitmap

func (Bit1024) UnsetI16

func (b Bit1024) UnsetI16(i int16)

UnsetI16 : unset bit

func (Bit1024) UnsetI32

func (b Bit1024) UnsetI32(i int32)

UnsetI32 : unset bit

type U32BitTip

type U32BitTip struct {
	Start uint32
	B1024 Bit1024
}

U32BitTip combine uint32 and 1024

func NewU32BitTip

func NewU32BitTip() *U32BitTip

NewU32BitTip : new big u32

func NewU32BitTipFromData

func NewU32BitTipFromData(start uint32, buf []byte) (*U32BitTip, error)

NewU32BitTipFromData : new big u32 from uint32 and []byte

func NewU32BitTipFromU32

func NewU32BitTipFromU32(u32 uint32) *U32BitTip

NewU32BitTipFromU32 : new u32 bit tip from uint32

func (*U32BitTip) GetNAsI64

func (b *U32BitTip) GetNAsI64(n int) []uint32

GetNAsI64 : iterate bitmap input: n -- iter count return: actually iter list

func (*U32BitTip) IterAsU32

func (b *U32BitTip) IterAsU32(s []uint32, pos int, n int) int

IterAsU32 : iterate bitmap input: s -- an uint32 array, pos -- slice position, n -- iter count return: actually iter count

func (*U32BitTip) RGetNAsI64

func (b *U32BitTip) RGetNAsI64(n int) []uint32

RGetNAsI64 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (*U32BitTip) RIterAsU32

func (b *U32BitTip) RIterAsU32(s []uint32, pos int, n int) int

RIterAsU32 : reverse iterate bitmap input: s -- an uint32 array, pos -- slice position, n -- iter count return: actually iter count

func (*U32BitTip) Reverse

func (b *U32BitTip) Reverse() *U32BitTip

Reverse : reverse bit

func (*U32BitTip) SetU32

func (b *U32BitTip) SetU32(u32 uint32) error

SetU32 set uint32

type U32BitTips

type U32BitTips []*U32BitTip

U32BitTips U32BitTip list

func (U32BitTips) GetNAsU32

func (b U32BitTips) GetNAsU32(n int) []uint32

GetNAsU32 : iterate bitmap input: n -- iter count return: actually iter list

func (U32BitTips) RGetNAsU32

func (b U32BitTips) RGetNAsU32(n int) []uint32

RGetNAsU32 : reverse iterate bitmap input: n -- iter count return: actually iter list

func (U32BitTips) Reverse

func (b U32BitTips) Reverse() U32BitTips

Reverse : clone and reverse bit

Jump to

Keyboard shortcuts

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