Template Class ProductQuantization

Class Documentation

template<int kNumComponents, int kNumDimPerComp, int kNumCenters, typename IndexType>
class product_quantization::ProductQuantization

Public Types

typedef Matrix<float, kNumComponents * kNumDimPerComp, 1> VectorType
typedef Matrix<float, kNumComponents * kNumDimPerComp, Dynamic> VectorMatrixType
typedef Matrix<float, kNumDimPerComp, kNumComponents * kNumCenters> ClusterType
typedef Matrix<IndexType, kNumComponents, 1> QuantizedVectorType
typedef Matrix<IndexType, kNumComponents, Dynamic> QuantizedVectorMatrixType

Public Functions

inline ProductQuantization()
inline explicit ProductQuantization(const ClusterType &cluster_centers)
inline void SetClusterCenters(const ClusterType &cluster_centers)
inline void Quantize(const VectorMatrixType &vectors, QuantizedVectorMatrixType *quantized_vectors) const
inline void Quantize(const VectorType &vector, QuantizedVectorType *quantized_vector) const
inline void FillLUT(const VectorType &vector, Matrix<float, kNumComponents, kNumCenters> *lut) const
inline void ComputeDistances(const Matrix<float, kNumComponents, kNumCenters> &lut, const QuantizedVectorMatrixType &quantized_vectors, Matrix<float, 1, Dynamic> *squared_distances) const
inline float ComputeDistance(const Matrix<float, kNumComponents, kNumCenters> &lut, const QuantizedVectorType &quantized_vectors) const
inline void ComputeAndAddDistances(const Matrix<float, kNumComponents, kNumCenters> &lut, const QuantizedVectorMatrixType &quantized_vectors, Matrix<float, 1, Dynamic> *squared_distances) const