Documentation
¶
Index ¶
- type BinArray
- func (b *BinArray) All() *BinArray
- func (b *BinArray) And(w *BinArray) *BinArray
- func (b *BinArray) Clone() *BinArray
- func (b *BinArray) Count() int
- func (b *BinArray) Equal(w *BinArray) bool
- func (b *BinArray) Get(pos int) uint64
- func (b *BinArray) Inverse() *BinArray
- func (b *BinArray) Is(pos int) bool
- func (b *BinArray) Minus(w *BinArray) *BinArray
- func (b *BinArray) None() *BinArray
- func (b *BinArray) Or(w *BinArray) *BinArray
- func (b *BinArray) Set(pos int) *BinArray
- func (b *BinArray) ShiftLeft(times int) *BinArray
- func (b *BinArray) ShiftRight(times int) *BinArray
- func (b *BinArray) Size() int
- func (b *BinArray) String() string
- func (b *BinArray) Xor(w *BinArray) *BinArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinArray ¶
type BinArray struct {
// contains filtered or unexported fields
}
func NewBinArray ¶
NewBinArray returns a *BinArray possible to hold num bits.
func (*BinArray) All ¶
All returns a bit array with all bits set to 1. It does not change the receiver.
func (*BinArray) And ¶
And performs the and boolean operator on all bits. Also on the ones outside the size area.
func (*BinArray) Clone ¶
Clone creates a copy of the original bin array. It does not change the receiver.
func (*BinArray) Count ¶
Count returns the number of 1 bits in the array. It does not change the receiver.
func (*BinArray) Is ¶
Is checks if the pos bit of the bin array is 1. It does not change the receiver.
func (*BinArray) Minus ¶
Minus performs the minus boolean operator on all bits. Also on the ones outside the size area.
func (*BinArray) Or ¶
Or performs the or boolean operator on all bits. Also on the ones outside the size area.
func (*BinArray) ShiftLeft ¶
ShiftLeft shifts all bits times to the left. The parameter times cannot be greater than 64.
func (*BinArray) ShiftRight ¶
ShiftLeft shifts all bits times to the right. The parameter times cannot be greater than 64.