bitmap

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2018 License: Apache-2.0 Imports: 0 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

bitmap

import "github.com/andy2046/bitmap"

Overview

Package bitmap implements Bitmap in Go.

Index

Package files

bitmap.go

Constants

const MaxBitmapSize int64 = 0x01 << 40

MaxBitmapSize is the maximum bitmap size (in bits).

type Bitmap

type Bitmap struct {
    // contains filtered or unexported fields
}

Bitmap represents a bitmap.

func New
func New(size int64) *Bitmap

New creates a new Bitmap.

func (*Bitmap) GetBit
func (b *Bitmap) GetBit(offset int64) bool

GetBit returns the value of bit at offset.

func (*Bitmap) SetBit
func (b *Bitmap) SetBit(offset int64, v bool) bool

SetBit sets bit at offset to value v.

func (*Bitmap) Size
func (b *Bitmap) Size() int64

Size returns the bitmap size (in bits).

Documentation

Overview

Package bitmap implements Bitmap in Go.

Index

Constants

View Source
const MaxBitmapSize int64 = 0x01 << 40

MaxBitmapSize is the maximum bitmap size (in bits).

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitmap

type Bitmap struct {
	// contains filtered or unexported fields
}

Bitmap represents a bitmap.

func New

func New(size int64) *Bitmap

New creates a new Bitmap.

func (*Bitmap) GetBit

func (b *Bitmap) GetBit(offset int64) bool

GetBit returns the value of bit at offset.

func (*Bitmap) SetBit

func (b *Bitmap) SetBit(offset int64, v bool) bool

SetBit sets bit at offset to value v.

func (*Bitmap) Size

func (b *Bitmap) Size() int64

Size returns the bitmap size (in bits).

Jump to

Keyboard shortcuts

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