util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bit     uint64 = 1
	AllBits uint64 = 0xFFFFFFFFFFFFFFFF
)

Variables

This section is empty.

Functions

func GetSharedIDs

func GetSharedIDs(sets []*IntSet, minCount int) []uint

GetSharedIDs IDs that are contained by at least minCount of the provided sets

Types

type IntSet

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

func NewIntSet

func NewIntSet() *IntSet

func NewIntSetFromInts

func NewIntSetFromInts(values []int) *IntSet

func NewIntSetFromUInts

func NewIntSetFromUInts(values []uint) *IntSet

func (*IntSet) Add

func (set *IntSet) Add(x uint)

func (*IntSet) AddInts

func (set *IntSet) AddInts(values []int)

func (*IntSet) AsInts

func (set *IntSet) AsInts() []int

func (*IntSet) Clear

func (set *IntSet) Clear()

func (*IntSet) Contains

func (set *IntSet) Contains(x uint) bool

func (*IntSet) CountIntersection

func (set *IntSet) CountIntersection(other *IntSet) uint

func (*IntSet) CountMembers

func (set *IntSet) CountMembers() uint

func (*IntSet) GetFirstID

func (set *IntSet) GetFirstID() (bool, uint)

func (*IntSet) GetNextID

func (set *IntSet) GetNextID(x uint) (bool, uint)

func (*IntSet) Intersect

func (set *IntSet) Intersect(other *IntSet)

func (*IntSet) IsEmpty

func (set *IntSet) IsEmpty() bool

func (*IntSet) Remove

func (set *IntSet) Remove(x uint)

func (*IntSet) RemoveAll

func (set *IntSet) RemoveAll(other *IntSet)

func (*IntSet) Size

func (set *IntSet) Size() uint

Size gets an upper bound on the size of this set. After a call to CountMembers this value is accurate until elements are removed.

func (*IntSet) String

func (set *IntSet) String() string

func (*IntSet) Union

func (set *IntSet) Union(other *IntSet)

type SeekableGZipReader

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

SeekableGZip is a Reader (wrapping a gzip.Reader) and adds a Seek function This can therefore be used as a ReadSeekCloser for sequence.SequenceSet

func NewSeekableGZipReader

func NewSeekableGZipReader(r io.Reader) *SeekableGZipReader

func (*SeekableGZipReader) Close

func (s *SeekableGZipReader) Close() error

func (*SeekableGZipReader) Multistream

func (s *SeekableGZipReader) Multistream(ok bool)

func (*SeekableGZipReader) Read

func (s *SeekableGZipReader) Read(p []byte) (int, error)

func (*SeekableGZipReader) Reset

func (s *SeekableGZipReader) Reset(r io.Reader) error

func (*SeekableGZipReader) Seek

func (s *SeekableGZipReader) Seek(offset int64, whence int) (int64, error)

Jump to

Keyboard shortcuts

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