MCPcopy
hub / github.com/lindb/lindb / NewFloatArray

Function NewFloatArray

pkg/collections/array_list.go:34–44  ·  view source on GitHub ↗

NewFloatArray creates a float array with a certain capacity

(capacity int)

Source from the content-addressed store, hash-verified

32
33// NewFloatArray creates a float array with a certain capacity
34func NewFloatArray(capacity int) *FloatArray {
35 markLen := capacity / blockSize
36 if capacity%blockSize > 0 {
37 markLen++
38 }
39 return &FloatArray{
40 capacity: capacity,
41 values: make([]float64, capacity),
42 marks: make([]uint8, markLen),
43 }
44}
45
46// HasValue returns if has value with pos
47func (f *FloatArray) HasValue(pos int) bool {

Callers 15

evalMethod · 0.92
TestOrderByRowFunction · 0.92
AggregateBySlotMethod · 0.92
TestPrimitiveIteratorFunction · 0.92
TestBinary_Eval_SingleFunction · 0.92
TestBinaryEvalFunction · 0.92
generateFloatArrayFunction · 0.92
binaryEvalFunction · 0.92
TestFuncCall_UnknownFunction · 0.92
TestFuncCall_SumFunction · 0.92

Calls

no outgoing calls

Tested by 14

TestOrderByRowFunction · 0.74
TestPrimitiveIteratorFunction · 0.74
TestBinary_Eval_SingleFunction · 0.74
TestBinaryEvalFunction · 0.74
generateFloatArrayFunction · 0.74
TestFuncCall_UnknownFunction · 0.74
TestFuncCall_SumFunction · 0.74
makeFloatArrayFunction · 0.74
Test_AvgCallFunction · 0.74
TestRateCallFunction · 0.74