MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / final_score

Function final_score

libatomic/src/daemon/services_agent.rs:195–202  ·  view source on GitHub ↗

Combine the candidate score parts into the final ranking score.

(candidate: &CandidateScore, recency: f64)

Source from the content-addressed store, hash-verified

193
194 /// Combine the candidate score parts into the final ranking score.
195 fn final_score(candidate: &CandidateScore, recency: f64) -> f64 {
196 let neighbor = if candidate.neighbor {
197 NEIGHBOR_BONUS
198 } else {
199 0.0
200 };
201 candidate.base + neighbor + RECENCY_WEIGHT * recency
202 }
203
204 fn why_matched(candidate: &CandidateScore) -> &'static str {
205 match (candidate.base > 0.0, candidate.neighbor) {

Callers 1

resolve_and_rankFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected