-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShortestPathSample.java
More file actions
40 lines (35 loc) · 855 Bytes
/
Copy pathShortestPathSample.java
File metadata and controls
40 lines (35 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package graph;
/**
* ShortestPath example which extends from SimpleShortestPaths
* which is used for testing.
* @author Khang
*/
public class ShortestPathSample extends SimpleShortestPaths {
/**
* Constructor.
* @param G this is parameter for graph
* @param source this is parameter
*/
public ShortestPathSample(Graph G, int source) {
super(G, source);
}
/**
* shortestpath sample.
* @param G this is parameter for graph
* @param source this is parameter for source
* @param dest this is parameter for destination
*/
public ShortestPathSample(Graph G, int source, int dest) {
super(G, source, dest);
}
/**
*
* @param u
* @param v
* @return
*/
@Override
protected double getWeight(int u, int v) {
return 0.0;
}
}