Documentation
¶
Index ¶
- type VarRing
- func (v *VarRing) Add(a interface{}, x, y int64)
- func (v *VarRing) BatchAdd(a interface{}, start int64, os []uint8, vps []uint64)
- func (v *VarRing) BatchFill(start int64, os []uint8, vps []uint64, zs []int64, vec *vector.Vector)
- func (v *VarRing) BulkFill(i int64, zs []int64, vec *vector.Vector)
- func (v *VarRing) Count() int
- func (v *VarRing) Dup() ring.Ring
- func (v *VarRing) Eval(zs []int64) *vector.Vector
- func (v *VarRing) Fill(i, j int64, z int64, vec *vector.Vector)
- func (v *VarRing) Free(m *mheap.Mheap)
- func (v *VarRing) Grow(m *mheap.Mheap) error
- func (v *VarRing) Grows(N int, m *mheap.Mheap) error
- func (v *VarRing) Mul(a interface{}, x, y, z int64)
- func (v *VarRing) SetLength(n int)
- func (v *VarRing) Shrink(selectIndexes []int64)
- func (v *VarRing) Shuffle(_ []int64, _ *mheap.Mheap) error
- func (v *VarRing) Size() int
- func (v *VarRing) String() string
- func (v *VarRing) Type() types.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VarRing ¶
type VarRing struct {
// Typ is vector's value type
Typ types.Type
// attributes for computing the variance
Data []byte
SumX []float64 // sum of x, its memory address is same to Data, because we will use it to store result finally.
SumX2 []float64 // sum of x^2
NullCounts []int64 // group to record number of the null value
}
VarRing is the ring structure to compute the Overall variance we use E(x^2) - E(x)^2 to compute the result, so we need the average of x and sum of x ^ 2
func NewVarianceRing ¶
func (*VarRing) BatchFill ¶
BatchFill use parts of vector to update the ring For each item o of os ring's group `vps[o]-1` is related to vector's row `start+o`
Click to show internal directories.
Click to hide internal directories.