Skip to content

Commit

Permalink
Merge branch 'pybind11' of https://github.com/easy-graph/Easy-Graph i…
Browse files Browse the repository at this point in the history
…nto pybind11
  • Loading branch information
yizhihenpidehou committed Feb 21, 2024
2 parents b547d77 + 68b5945 commit a05f89f
Show file tree
Hide file tree
Showing 3 changed files with 322 additions and 29 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Introduction

News
----
- [02-05-2024] We release EasyGraph 1.1! This version features hypergraph analysis and learning for higher-order network modeling and representation.
- [08-17-2023] We release EasyGraph 1.0!
- [08-08-2023] Our paper "EasyGraph: A Multifunctional, Cross-Platform, and Effective Library for Interdisciplinary Network Analysis" has been accepted by Patterns!

Expand Down
7 changes: 4 additions & 3 deletions easygraph/functions/community/ego_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ def ego_graph(G, n, radius=1, center=True, undirected=False, distance=None):
"""
else:
if distance is not None:
sp = eg.single_source_dijkstra(G, n, cutoff=radius, weight=distance)
sp = eg.single_source_dijkstra(G, n, weight=distance)
else:
sp = eg.single_source_dijkstra(G, n, cutoff=radius, weight=distance)
nodes = list(sp.keys())
sp = eg.single_source_dijkstra(G, n)
nodes = [key for key, value in sp.items() if value <= radius]
nodes = list(nodes)
# for i,wd in sp.items():
# print(i,wd)
H = G.nodes_subgraph(nodes)
Expand Down
Loading

0 comments on commit a05f89f

Please sign in to comment.