Skip to content

Commit

Permalink
Improved neatness of code.
Browse files Browse the repository at this point in the history
  • Loading branch information
vrbouza committed Nov 4, 2024
1 parent 65c2fdf commit 270e9ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ pub fn main() -> Result<(), Error> {
references.get_sketch_slice(j, k),
references.sketch_size,
);
dist = if *ani { ani_pois(dist, k_f32) } else { 1 as f32 - dist };
dist = if *ani { ani_pois(dist, k_f32) } else { 1.0_f32 - dist };
dist_slice[dist_idx] = dist;
} else {
let dist =
Expand Down Expand Up @@ -275,7 +275,7 @@ pub fn main() -> Result<(), Error> {
references.sketch_size,
);
dist =
if *ani { ani_pois(dist, k_f32) } else { 1 as f32 - dist };
if *ani { ani_pois(dist, k_f32) } else { 1.0_f32 - dist };
let dist_item = SparseJaccard(j, dist);
if heap.len() < nn
|| dist_item < *heap.peek().unwrap()
Expand Down Expand Up @@ -350,7 +350,7 @@ pub fn main() -> Result<(), Error> {
query_db.get_sketch_slice(j, k),
references.sketch_size,
);
dist = if *ani { ani_pois(dist, k_f32) } else { 1 as f32 - dist };
dist = if *ani { ani_pois(dist, k_f32) } else { 1.0_f32 - dist };
dist_slice[dist_idx] = dist;
} else {
let dist = core_acc_dist(&references, &query_db, i, j);
Expand Down

0 comments on commit 270e9ee

Please sign in to comment.