MCPcopy Create free account
hub / github.com/Seogeurim/CS-study / main

Method main

contents/algorithm/code/BellmanFordTest.java:5–18  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

3public class BellmanFordTest {
4
5 public static void main(String[] args) {
6 BellmanFord bf = new BellmanFord(5);
7 bf.addEdge(3, 5, 3);
8 bf.addEdge(3, 4, 3);
9 bf.addEdge(4, 2, 3);
10 bf.addEdge(5, 3, 2);
11 bf.addEdge(4, 5, -6);
12 bf.addEdge(1, 4, 3);
13 bf.addEdge(1, 3, 5);
14 bf.addEdge(1, 2, 7);
15
16// bf.printEdges();
17 bf.getShortestDistance(1);
18 }
19}
20
21class BellmanFord {

Callers

nothing calls this directly

Calls 2

addEdgeMethod · 0.95
getShortestDistanceMethod · 0.95

Tested by

no test coverage detected