-
Notifications
You must be signed in to change notification settings - Fork 1
/
graph-benchmark-code.yaml
51 lines (51 loc) · 2.82 KB
/
graph-benchmark-code.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
easygraph:
loading: '''read_edgelist(filename, delimiter="\t", nodetype=int, create_using=eg.DiGraph()).cpp()'''
loading_undirected: '''read_edgelist(filename, delimiter="\t", nodetype=int, create_using=eg.Graph()).cpp()'''
# page rank: "'pagerank(g)'"
shortest path: f'Dijkstra(g, {nodeid})'
strongly connected components: "'[i for i in strongly_connected_components(g)]'"
graphtool:
2-hops: '"shortest_distance(g, g.vertex(0), max_dist=2).a"'
k-core: "'kcore_decomposition(g).a'"
loading:
'''''''load_graph_from_csv(filename, directed=True, csv_options={''delimiter'':
''\t'', ''quotechar'': ''"''})'''''''
loading_undirected:
'''''''load_graph_from_csv(filename, directed=False, csv_options={''delimiter'':
''\t'', ''quotechar'': ''"''})'''''''
page rank: "'pagerank(g, damping=0.85, epsilon=1e-3, max_iter=10000000).a'"
shortest path: '"shortest_distance(g, g.vertex(0)).a"'
strongly connected components:
"'cc, _ = label_components(g, vprop=None, directed=True,
attractors=False); cc.a'"
igraph:
k-core: '"g.coreness(mode=''all'')"'
loading: '"Graph.Read(filename, format=''edges'')"'
loading_undirected: '"Graph.Read(filename, format=''edges'', directed=False)"'
page rank: '"g.pagerank(damping=0.85)"'
shortest path: '"g.shortest_paths([g.vs[0]])"'
strongly connected components: '"[i for i in g.components(mode=STRONG)]"'
networkit:
k-core: '"nk.centrality.CoreDecomposition(g).run().scores()"'
loading:
'"nk.graphio.EdgeListReader(separator=''\t'', firstNode=0, continuous=True,
directed =True).read(filename)"'
loading_undirected: '"nk.graphio.EdgeListReader(separator=''\t'', firstNode=0, continuous=True).read(filename)"'
page rank: '"nk.centrality.PageRank(g, damp=0.85, tol=1e-3).run().scores()"'
shortest path: '"nk.distance.BFS(g, 0, storePaths=False).run().getDistances(False)"'
strongly connected components: '"nk.components.StronglyConnectedComponents(g).run().getPartition().getVector()"'
networkx:
2-hops: f'single_source_shortest_path_length(g, {nodeid}, cutoff=2)'
k-core: "'core.core_number(g)'"
loading: '''read_edgelist(filename, delimiter="\t", nodetype=int, create_using=nx.DiGraph())'''
loading_undirected: '''read_edgelist(filename, delimiter="\t", nodetype=int, create_using=nx.Graph())'''
page rank: "'pagerank(g, alpha=0.85, tol=1e-3, max_iter=10000000)'"
shortest path: f'shortest_path_length(g, {nodeid})'
strongly connected components: "'[i for i in strongly_connected_components(g)]'"
snap:
2-hops: '"snap.GetNodesAtHop(g, 0, 2, NodeVec, True)"'
k-core: '"snap.GetKCoreNodes(g, CoreIDSzV)"'
loading: '"snap.LoadEdgeListStr(snap.PNGraph, filename, 0, 1)"'
page rank: '"snap.GetPageRank(g, PRankH, 0.85, 1e-3, 10000000)"'
shortest path: '"snap.GetShortPath(g, 0, NIdToDistH, True)"'
strongly connected components: '"snap.GetSccs(g, Components)"'