mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-26 19:31:32 +01:00
feat: manual entity creation
chore: clippy
This commit is contained in:
@@ -305,9 +305,7 @@ async fn enrich_entities_from_graph(
|
||||
}
|
||||
|
||||
let existing_graph = entry.scores.graph.unwrap_or(f32::MIN);
|
||||
if graph_score > existing_graph {
|
||||
entry.scores.graph = Some(graph_score);
|
||||
} else if entry.scores.graph.is_none() {
|
||||
if graph_score > existing_graph || entry.scores.graph.is_none() {
|
||||
entry.scores.graph = Some(graph_score);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ impl Default for FusionWeights {
|
||||
}
|
||||
|
||||
pub fn clamp_unit(value: f32) -> f32 {
|
||||
value.max(0.0).min(1.0)
|
||||
value.clamp(0.0, 1.0)
|
||||
}
|
||||
|
||||
pub fn distance_to_similarity(distance: f32) -> f32 {
|
||||
|
||||
Reference in New Issue
Block a user