pub fn map_weights(result: &MappingResult, source_weights: &[f64]) -> Vec<f64>Expand description
Map source vertex weights to grid graph weights.
This function takes weights for each original vertex and maps them to the corresponding nodes in the grid graph.
§Arguments
result- The mapping result frommap_weightedsource_weights- Weights for each original vertex (should be in [0, 1])
§Returns
A vector of weights for each node in the grid graph.
§Panics
Panics if any weight is outside the range [0, 1] or if the number of weights doesn’t match the number of vertices.