-void MTPGraph::initialize_positivized_lengths_with_min() {
- scalar_t length_min = 0;
- for(int n = 0; n < _nb_vertices; n++) {
- for(Edge *e = _vertices[n].leaving_edges; e; e = e->next_leaving_edge) {
- length_min = min(e->length, length_min);
- }
- }
- for(int n = 0; n < _nb_vertices; n++) {
- for(Edge *e = _vertices[n].leaving_edges; e; e = e->next_leaving_edge) {
- e->positivized_length = e->length - length_min;
- }
- }
-}
-