vector

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: 11 Imported by: 2 modules, 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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(v *Vector, arg interface{}) error

func Clean

func Clean(v *Vector, m *mheap.Mheap)

func Copy

func Copy(v, w *Vector, vi, wi int64, m *mheap.Mheap) error

v[vi] = w[wi]

func DecodeFixedCol

func DecodeFixedCol[T any](v *Vector, sz int) []T

func Free

func Free(v *Vector, m *mheap.Mheap)

func Length

func Length(v *Vector) int

func PreAlloc

func PreAlloc(v, w *Vector, rows int, m *mheap.Mheap)

func Reset

func Reset(v *Vector)

func SetCol

func SetCol(v *Vector, col interface{})

func SetLength

func SetLength(v *Vector, n int)

func Shrink

func Shrink(v *Vector, sels []int64)

func Shuffle

func Shuffle(v *Vector, sels []int64, m *mheap.Mheap) error

func Union

func Union(v, w *Vector, sels []int64, m *mheap.Mheap) error

func UnionBatch

func UnionBatch(v, w *Vector, offset int64, cnt int, flags []uint8, m *mheap.Mheap) error

func UnionOne

func UnionOne(v, w *Vector, sel int64, m *mheap.Mheap) error

Types

type Vector

type Vector struct {
	Or   bool   // true: origin
	Ref  uint64 // reference count
	Link uint64 // link count
	Data []byte // raw data
	Typ  types.Type
	Col  interface{}  // column data, encoded Data
	Nsp  *nulls.Nulls // nulls list
}

* origin true: * count || type || bitmap size || bitmap || vector * origin false: * count || vector

func Dup

func Dup(v *Vector, m *mheap.Mheap) (*Vector, error)

func New

func New(typ types.Type) *Vector

func Window

func Window(v *Vector, start, end int, w *Vector) *Vector

func (*Vector) GetColumnData

func (v *Vector) GetColumnData(selectIndexs []int64, occurCounts []int64, rs []string) error

GetColumnData get whole column from a vector

func (*Vector) Read

func (v *Vector) Read(data []byte) error

func (*Vector) Show

func (v *Vector) Show() ([]byte, error)

func (*Vector) String

func (v *Vector) String() string

Jump to

Keyboard shortcuts

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