Skip to content

Commit 5f4347b

Browse files
committed
Fix Errors
1 parent 2bb797d commit 5f4347b

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎Cargo.lock‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎asap-common/sketch-core/src/count_min_sketchlib.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use sketchlib_rust::countmin::CountMinF64;
2-
use sketchlib_rust::{SketchInput, Vector2D};
1+
use sketchlib_rust::{CountMin, RegularPath, SketchInput, Vector2D};
32

43
/// Concrete Count-Min type from sketchlib-rust when sketchlib backend is enabled.
5-
pub type SketchlibCms = CountMinF64;
4+
/// Uses f64 counters (Vector2D<f64>) for weighted updates without integer rounding.
5+
pub type SketchlibCms = CountMin<Vector2D<f64>, RegularPath>;
66

77
/// Creates a fresh sketchlib Count-Min sketch with the given dimensions.
88
pub fn new_sketchlib_cms(row_num: usize, col_num: usize) -> SketchlibCms {
9-
CountMinF64::with_dimensions(row_num, col_num)
9+
SketchlibCms::with_dimensions(row_num, col_num)
1010
}
1111

1212
/// Builds a sketchlib Count-Min sketch from an existing `sketch` matrix.
@@ -22,7 +22,7 @@ pub fn sketchlib_cms_from_matrix(
2222
.copied()
2323
.unwrap_or(0.0)
2424
});
25-
CountMinF64::from_storage(matrix)
25+
SketchlibCms::from_storage(matrix)
2626
}
2727

2828
/// Converts a sketchlib Count-Min sketch into the legacy `Vec<Vec<f64>>` matrix.

0 commit comments

Comments
 (0)