Skip to content

Commit

Permalink
add comment of paths in AdjMatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmintor committed Jan 9, 2016
1 parent d774f18 commit c119a8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/basicgraph/GraphAdjMatrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public List<Integer> getDistance2(int v) {

List<Integer> distance2 = new ArrayList<Integer>();
for(int twoHopNeighbor = 0; twoHopNeighbor < numVertices; twoHopNeighbor++)
// if(twoHopAdjMatrix[v][twoHopNeighbor] > 0 && !distance2.contains(twoHopNeighbor))
// the number of entity means the multiple paths between two vertices.
if(twoHopAdjMatrix[v][twoHopNeighbor] > 0 )
for(int paths= twoHopAdjMatrix[v][twoHopNeighbor] ; paths > 0; paths--)
distance2.add(twoHopNeighbor);
Expand Down

0 comments on commit c119a8c

Please sign in to comment.