batch

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

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.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BatNotFoundErr      = errors.New("not found error")
	BatAlreadyClosedErr = errors.New("already closed error")
)

Functions

This section is empty.

Types

type Batch

type Batch struct {
	sync.RWMutex
	AttrsMap   map[int]int
	Attrs      []int
	Vecs       []vector.IVector
	ClosedMask *roaring.Bitmap
}

func (*Batch) Close

func (bat *Batch) Close() error

func (*Batch) CloseVector

func (bat *Batch) CloseVector(attr int) error

func (*Batch) GetAttrs

func (bat *Batch) GetAttrs() []int

func (*Batch) GetReaderByAttr

func (bat *Batch) GetReaderByAttr(attr int) (dbi.IVectorReader, error)

func (*Batch) GetVectorByAttr

func (bat *Batch) GetVectorByAttr(attr int) (vector.IVector, error)

func (*Batch) IsReadonly

func (bat *Batch) IsReadonly() bool

func (*Batch) IsVectorClosed

func (bat *Batch) IsVectorClosed(attr int) (bool, error)

func (*Batch) Length

func (bat *Batch) Length() int

type IBatch

type IBatch interface {
	dbi.IBatchReader
	GetVectorByAttr(attrId int) (vector.IVector, error)
}

func NewBatch

func NewBatch(attrs []int, vecs []vector.IVector) (IBatch, error)

Jump to

Keyboard shortcuts

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