pqmr

package
v0.0.0-...-9f3af7c Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: AGPL-3.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WritePqmrToDisk

func WritePqmrToDisk(buf []byte, fileName string) error

Types

type PQMatchResults

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

func Clone

func Clone(srcPqmr *PQMatchResults) *PQMatchResults

func CreatePQMatchResults

func CreatePQMatchResults(maxEntries uint) *PQMatchResults

func CreatePQMatchResultsFromBs

func CreatePQMatchResultsFromBs(b *bitset.BitSet) *PQMatchResults

func (*PQMatchResults) AddMatchedRecord

func (pqmr *PQMatchResults) AddMatchedRecord(recNum uint)

func (*PQMatchResults) All

func (pqmr *PQMatchResults) All() bool

func (*PQMatchResults) Any

func (pqmr *PQMatchResults) Any() bool

func (*PQMatchResults) ClearBit

func (pqmr *PQMatchResults) ClearBit(recNum uint)

func (*PQMatchResults) Copy

func (pqmr *PQMatchResults) Copy() *PQMatchResults

func (*PQMatchResults) DoesRecordMatch

func (pqmr *PQMatchResults) DoesRecordMatch(recNum uint) bool

func (*PQMatchResults) EncodePqmr

func (pqmr *PQMatchResults) EncodePqmr(buf []byte, blkNum uint16) (uint16, error)

func (*PQMatchResults) FlushPqmr

func (pqmr *PQMatchResults) FlushPqmr(fname *string, blkNum uint16) error

[blkNum - uint16][bitSetLen - uint16][raw bitset….]

func (*PQMatchResults) GetInMemSize

func (pqmr *PQMatchResults) GetInMemSize() uint64

func (*PQMatchResults) GetNumberOfBits

func (pqmr *PQMatchResults) GetNumberOfBits() uint

func (*PQMatchResults) GetNumberOfSetBits

func (pqmr *PQMatchResults) GetNumberOfSetBits() uint

func (*PQMatchResults) InPlaceIntersection

func (pqmr *PQMatchResults) InPlaceIntersection(compare *PQMatchResults)

func (*PQMatchResults) InPlaceUnion

func (pqmr *PQMatchResults) InPlaceUnion(compare *PQMatchResults)

func (*PQMatchResults) ResetAll

func (pqmr *PQMatchResults) ResetAll()

func (*PQMatchResults) Shrink

func (pqmr *PQMatchResults) Shrink(lastIdx uint) *PQMatchResults

func (*PQMatchResults) WriteTo

func (pqmr *PQMatchResults) WriteTo(fd *os.File) error

type SegmentPQMRResults

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

func InitSegmentPQMResults

func InitSegmentPQMResults() *SegmentPQMRResults

func ReadPqmr

func ReadPqmr(fname *string) (*SegmentPQMRResults, error)

read the pqmr file which has match results for each block return each of those pqmr blocks

func (*SegmentPQMRResults) CopyBlockResults

func (spqmr *SegmentPQMRResults) CopyBlockResults(blkNum uint16, og *PQMatchResults) uint64

returns the size of the copy

func (*SegmentPQMRResults) DoesBlockExist

func (spqmr *SegmentPQMRResults) DoesBlockExist(blkNum uint16) bool

Returns a boolean indicating whether blkNum exists for the spqmr

func (*SegmentPQMRResults) GetAllBlocks

func (spqmr *SegmentPQMRResults) GetAllBlocks() []uint16

returns all the blocks found in the spqmr

func (*SegmentPQMRResults) GetBlockResults

func (spqmr *SegmentPQMRResults) GetBlockResults(blkNum uint16) (*PQMatchResults, bool)

Returns the PQMatchResults, and a boolean indicating whether if blkNum was found if bool is false, PQMatchResults is nil

func (*SegmentPQMRResults) GetNumBlocks

func (spqmr *SegmentPQMRResults) GetNumBlocks() uint16

func (*SegmentPQMRResults) SetBlockResults

func (spqmr *SegmentPQMRResults) SetBlockResults(blkNum uint16, og *PQMatchResults)

Sets the block results. This should only be used for testing

Jump to

Keyboard shortcuts

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