Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add a few more BFS-based algorithms#51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
eriknw merged 7 commits intopython-graphblas:mainfromeriknw:more_bfs
Apr 15, 2023

Conversation

@eriknw
Copy link
Member

BFS is a workhorse! There are still many BFS-based algorithms still to do.

My main TODO is to benchmark these to give them a proper shakedown. I like to shake down most algorithms we add. Also, I wonder whether we should useA.T orAT in a couple places. I also wonder if we can come up with a heuristic to detect negative cycles.

It may be nice to know whether directed graphs are structurally symmetric. If we knew this, we could improveis_weakly_connected and other algorithms.

Also, there may be a couple NetworkX bugs to fix or behaviors to match.

Implemented:

  • Components
    • is_connected
    • is_weakly_connected
    • node_connected_component
  • Shortest Paths
    • all_pairs_shortest_path_length
    • negative_edge_cycle
    • single_source_shortest_path_length
    • single_target_shortest_path_length
  • Traversal
    • bfs_layers
    • descendants_at_distance

SultanOrazbayev reacted with rocket emoji
- Components  - `is_connected`  - `is_weakly_connected`  - `node_connected_component`- Shortest Paths  - `all_pairs_shortest_path_length`  - `negative_edge_cycle`  - `single_source_shortest_path_length`  - `single_target_shortest_path_length`- Traversal  - `bfs_layers`  - `descendants_at_distance`
@eriknw
Copy link
MemberAuthor

I'm also not sure if these are the best algorithms for connected component-related functions. Connected components are an important class of algorithms that we should add soon (for example, we have an implementation of FastSV in a Jupyter notebook that we can port over), so perhaps we'll revisit these algorithms then.

@codecov-commenter
Copy link

codecov-commenter commentedMar 15, 2023
edited
Loading

Codecov Report

Patch coverage:87.71% and project coverage change:+2.46 🎉

Comparison is base(6de1fd6) 69.16% compared to head(029a639) 71.62%.

📣 This organization is not using Codecov’sGitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories.Learn more

Additional details and impacted files
@@            Coverage Diff             @@##             main      #51      +/-   ##==========================================+ Coverage   69.16%   71.62%   +2.46%==========================================  Files          77       89      +12       Lines        3152     3461     +309       Branches      602      642      +40     ==========================================+ Hits         2180     2479     +299+ Misses        786      783       -3- Partials      186      199      +13
Impacted FilesCoverage Δ
graphblas_algorithms/nxapi/_utils.py57.47% <0.00%> (ø)
graphblas_algorithms/nxapi/cluster.py85.55% <ø> (+7.55%)⬆️
graphblas_algorithms/classes/nodeset.py69.44% <42.85%> (-2.20%)⬇️
...as_algorithms/algorithms/link_analysis/hits_alg.py60.86% <50.00%> (ø)
...blas_algorithms/nxapi/shortest_paths/unweighted.py62.50% <62.50%> (ø)
graphblas_algorithms/classes/nodemap.py50.67% <75.00%> (+1.70%)⬆️
...s_algorithms/algorithms/shortest_paths/weighted.py31.36% <78.12%> (+11.21%)⬆️
...algorithms/algorithms/shortest_paths/unweighted.py78.57% <78.57%> (ø)
graphblas_algorithms/algorithms/dag.py94.28% <81.81%> (+0.73%)⬆️
...as_algorithms/algorithms/shortest_paths/generic.py86.66% <92.30%> (+1.48%)⬆️
... and26 more

... and1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment?Let us know in this issue.

@eriknw
Copy link
MemberAuthor

Merging so we can do a release before PyConUS. May be able to benchmark and shakedown some algorithms later, but they're probably good enough.

@eriknweriknw merged commit09776b6 intopython-graphblas:mainApr 15, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@eriknw@codecov-commenter

[8]ページ先頭

©2009-2025 Movatter.jp