pub fn viterbi_decode(
position_candidates: &[Vec<CandidateNetElement>],
position_probabilities: &[Vec<f64>],
netelements: &[Netelement],
netelement_index: &HashMap<String, usize>,
graph: &DiGraph<NetelementSide, f64>,
node_map: &HashMap<NetelementSide, NodeIndex>,
cache: &mut ShortestPathCache,
config: &PathConfig,
) -> Result<ViterbiResult, ProjectionError>Expand description
Decode the most probable netelement sequence using the Viterbi algorithm.
§Arguments
position_candidates— Per-position candidate netelements (from Phase 1).position_probabilities— Per-position emission probabilities:position_probabilities[t][candidate_idx] = emission_prob.candidate_idxis an index intoposition_candidates[t].netelements— Full netelement set (for geometry lookups).netelement_index— Map from netelement ID → index innetelements.graph— Directed topology graph with distance-weighted edges.node_map— Map fromNetelementSide→NodeIndexingraph.cache— Mutable shortest-path cache (lazily populated).config— Path configuration (providesbeta,edge_zone_distance).
§Returns
A ViterbiResult with one or more sub-sequences covering all time-steps
that have at least one candidate.