Combine the candidate score parts into the final ranking score.
(candidate: &CandidateScore, recency: f64)
| 551 | |
| 552 | /// Combine the candidate score parts into the final ranking score. |
| 553 | fn final_score(candidate: &CandidateScore, recency: f64) -> f64 { |
| 554 | let neighbor = if candidate.neighbor { |
| 555 | NEIGHBOR_BONUS |
| 556 | } else { |
| 557 | 0.0 |
| 558 | }; |
| 559 | candidate.base + neighbor + RECENCY_WEIGHT * recency |
| 560 | } |
| 561 | |
| 562 | // Node id <-> vault path mapping |
| 563 | // |
no outgoing calls