Combine the candidate score parts into the final ranking score.
(candidate: &CandidateScore, recency: f64)
| 596 | |
| 597 | /// Combine the candidate score parts into the final ranking score. |
| 598 | fn final_score(candidate: &CandidateScore, recency: f64) -> f64 { |
| 599 | let neighbor = if candidate.neighbor { |
| 600 | NEIGHBOR_BONUS |
| 601 | } else { |
| 602 | 0.0 |
| 603 | }; |
| 604 | candidate.base + neighbor + RECENCY_WEIGHT * recency |
| 605 | } |
| 606 | |
| 607 | fn why_matched(candidate: &CandidateScore) -> &'static str { |
| 608 | match (candidate.base > 0.0, candidate.neighbor) { |
no outgoing calls