Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScalarQuantizer ¶
type ScalarQuantizer struct {
// contains filtered or unexported fields
}
ScalarQuantizer 标量量化器
func NewScalarQuantizer ¶
func NewScalarQuantizer(dimension, bits int) *ScalarQuantizer
NewScalarQuantizer 创建标量量化器
func Quantize ¶
func Quantize(vectors [][]float32, bits int) (*ScalarQuantizer, error)
Quantize 量化向量
func (*ScalarQuantizer) Decode ¶
func (sq *ScalarQuantizer) Decode(encoded []byte) []float32
Decode 解码向量
func (*ScalarQuantizer) Encode ¶
func (sq *ScalarQuantizer) Encode(vector []float32) []byte
Encode 编码向量
func (*ScalarQuantizer) Train ¶
func (sq *ScalarQuantizer) Train(vectors [][]float32) error
Train 训练量化器
Click to show internal directories.
Click to hide internal directories.