Skip to content

Commit

Permalink
adding directed to _calculate_all_pairs_node_connectivity_subset
Browse files Browse the repository at this point in the history
  • Loading branch information
Schefflera-Arboricola committed Feb 7, 2024
1 parent 5bc797e commit 414f2c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nx_parallel/algorithms/approximation/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def all_pairs_node_connectivity(G, nbunch=None, cutoff=None):
def _calculate_all_pairs_node_connectivity_subset(chunk):
def _calculate_all_pairs_node_connectivity_subset(chunk, directed=False):
for u, v in chunk:
k = local_node_connectivity(G, u, v, cutoff=cutoff)
all_pairs[u][v] = k
Expand Down Expand Up @@ -40,7 +40,7 @@ def _calculate_all_pairs_node_connectivity_subset(chunk):
pair_chunks = nxp.chunks(pairs, num_in_chunk)

Parallel(n_jobs=total_cores, backend="threading")(
delayed(_calculate_all_pairs_node_connectivity_subset)(chunk)
delayed(_calculate_all_pairs_node_connectivity_subset)(chunk, directed=directed)
for chunk in pair_chunks
)

Expand Down

0 comments on commit 414f2c8

Please sign in to comment.