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