-
Notifications
You must be signed in to change notification settings - Fork 4
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: cleanups, clarify (+test) connected components #180
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
==========================================
+ Coverage 83.55% 83.63% +0.08%
==========================================
Files 24 24
Lines 6317 6349 +32
Branches 6317 6349 +32
==========================================
+ Hits 5278 5310 +32
Misses 967 967
Partials 72 72 ☔ View full report in Codecov by Sentry. |
1b20fa1
to
cd5a239
Compare
src/view.rs
Outdated
/// Iterates over the input neighbours of the `node`. | ||
/// Shorthand for [`LinkView::neighbours`]`(`[`Direction::Incoming`]`)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Iterates over the input neighbours of the `node`. | |
/// Shorthand for [`LinkView::neighbours`]`(`[`Direction::Incoming`]`)`. | |
/// Iterates over the input neighbours of the `node`. | |
/// | |
/// Shorthand for [`LinkView::neighbours`]`(`[`Direction::Incoming`]`)`. |
src/view.rs
Outdated
/// Iterates over the output neighbours of the `node`. | ||
/// Shorthand for [`LinkView::neighbours`]`(`[`Direction::Outgoing`]`)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Iterates over the output neighbours of the `node`. | |
/// Shorthand for [`LinkView::neighbours`]`(`[`Direction::Outgoing`]`)`. | |
/// Iterates over the output neighbours of the `node`. | |
/// | |
/// Shorthand for [`LinkView::neighbours`]`(`[`Direction::Outgoing`]`)`. |
src/view/subgraph.rs
Outdated
/// If both incoming and outgoing boundary edges are empty, the subgraph is taken | ||
/// to be the entire graph (i.e. all components); otherwise, the subgraph | ||
/// contains only the parts of those components of which the boundary includes | ||
/// at least one edge (or disconnected port). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be more clear?
/// If both incoming and outgoing boundary edges are empty, the subgraph is taken | |
/// to be the entire graph (i.e. all components); otherwise, the subgraph | |
/// contains only the parts of those components of which the boundary includes | |
/// at least one edge (or disconnected port). | |
/// If both incoming and outgoing boundary edges are empty, the subgraph is taken | |
/// to be the entire graph (i.e. all components); otherwise, connected components that do not appear in the boundary will not be included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like "appear in the boundary" but rephrased to avoid the double negative (do not appear...will not be)
@@ -42,8 +42,13 @@ use super::{MultiView, PortView}; | |||
/// wall. The [Direction] of edges (incoming/outgoing) defines which side of | |||
/// the wall is inside, and which is outside. | |||
/// | |||
/// If both incoming and outgoing boundary edges are empty, the subgraph is | |||
/// taken to be the entire graph. | |||
/// Note that if the graph contains multiple connected components, there may be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-reading this definition, it seems to be describing the behaviour of Subgraph::new_subgraph
rather than the structure itself.
(It's missing the arbitrary extra nodes).
Should we move this there, or add the optional closed connected components here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good point. I kept the first bit here (introduction to the concept, boundary does not distinguish between two possibilities) and moved the rest to new_subgraph
CodSpeed Performance ReportMerging #180 will not alter performanceComparing Summary
|
## 🤖 New release * `portgraph`: 0.13.1 -> 0.13.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.13.2](v0.13.1...v0.13.2) - 2025-02-24 ### Documentation - cleanups, clarify (+test) connected components (#180) ### New Features - add Subgraph::copy_in_parent (#182) ### Refactor - Simplify PortGraph::port_links (#188) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
Most of this relates to the behaviour on connected components (the correct name - each component is connected), but a few other small doc fixes as, erm, I've not looked at any of the code for awhile....