This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
OpenI
/
graphkit-learn
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
2
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Correction of minor bug on shortest paths computations
v0.1
Benoit GAUZERE
7 years ago
parent
66129a66df
commit
0b2e8ce08f
1 changed files
with
3 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-2
pygraph/utils/utils.py
+ 3
- 2
pygraph/utils/utils.py
View File
@@ -5,6 +5,7 @@ import numpy as np
def getSPLengths(G1):
sp = nx.shortest_path(G1)
distances = np.zeros((G1.number_of_nodes(), G1.number_of_nodes()))
for i in
n
p.keys():
for j in
n
p[i].keys():
for i in
s
p.keys():
for j in
s
p[i].keys():
distances[i, j] = len(sp[i][j])-1
return distances
Write
Preview
Loading…
Cancel
Save