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