(
&self,
vector: &[f32],
storage_type: StorageType,
range: (f32, f32),
)
| 506 | |
| 507 | impl Quantization for QuantizationMetric { |
| 508 | fn quantize( |
| 509 | &self, |
| 510 | vector: &[f32], |
| 511 | storage_type: StorageType, |
| 512 | range: (f32, f32), |
| 513 | ) -> Result<Storage, QuantizationError> { |
| 514 | match self { |
| 515 | Self::Scalar => ScalarQuantization.quantize(vector, storage_type, range), |
| 516 | Self::Product(product) => product.quantize(vector, storage_type, range), |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | fn train(&mut self, vectors: &[&[f32]]) -> Result<(), QuantizationError> { |
| 521 | match self { |
nothing calls this directly
no outgoing calls
no test coverage detected