pub fn apply_anchors(
anchors: &[ResolvedAnchor],
position_candidates: &mut [Vec<CandidateNetElement>],
emission_probs: &mut [Vec<f64>],
netelements: &[Netelement],
netelement_index: &HashMap<String, usize>,
gnss_index_map: Option<&[usize]>,
) -> Result<(), DetectionError>Expand description
Apply every anchor to position_candidates / emission_probs.
gnss_index_map (when Some) maps the anchor’s original GNSS index
(referring to the input GNSS array) to the working index (after
resampling). When None, anchors are assumed to use working indices
directly.
Out-of-bounds anchors (gnss_index >= position_candidates.len()) are
silently skipped — the caller’s filter pass should already have removed
them, but defensive checks keep us robust against resampling edge cases.