Int based linear interpol (#1482)

* Rename BlockwiseLinear to BlockwiseLinearLegacy

Reimplements the blockwise multilinear codec using integer arithmetics.
Added comments

* add estimate for blockwise

* Added one unit test

* use int based for linear interpol

* fix merge conflicts

* reuse code

* cargo fmt

* fix clippy

* fix test

* fix off by one

fix off by one to accurately interpolate autoincrement fields

* extend test, fix estimate

* remove legacy codec

Co-authored-by: Pascal Seitz <pascal.seitz@gmail.com>
This commit is contained in:
Paul Masurel
2022-09-05 15:53:00 +09:00
committed by GitHub
parent 00657d9e99
commit ea72cf34d6
5 changed files with 470 additions and 574 deletions

View File

@@ -400,7 +400,11 @@ mod tests {
let file = directory.open_read(path).unwrap();
// assert_eq!(file.len(), 17710 as usize); //bitpacked size
// assert_eq!(file.len(), 10175_usize); // linear interpol size
assert_eq!(file.len(), 75_usize); // linear interpol size after calc improvement
// assert_eq!(file.len(), 75_usize); // linear interpol size after calc improvement
// assert_eq!(file.len(), 1325_usize); // linear interpol size after switching to int based
assert_eq!(file.len(), 62_usize); // linear interpol size after switching to int based, off
// by one fix
{
let fast_fields_composite = CompositeFile::open(&file)?;
let data = fast_fields_composite