mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
This commit is contained in:
parent
d2fdbaf67e
commit
5d99138cb2
4 changed files with 34 additions and 5 deletions
|
@ -53,7 +53,7 @@ fn print_sol(dist []int) {
|
|||
// to all other vertices using Bellman-Ford algorithm. The
|
||||
// function also detects negative weight cycle
|
||||
fn bellman_ford[T](graph [][]T, src int) {
|
||||
mut edges := build_map_edges_from_graph(graph)
|
||||
mut edges := build_map_edges_from_graph[int](graph)
|
||||
// this function was done to adapt a graph representation
|
||||
// by a adjacency matrix, to list of adjacency (using a MAP)
|
||||
n_edges := edges.len // number of EDGES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue