Skip to content
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

Add / Modify biconnected components #4

Open
akcube opened this issue Dec 20, 2022 · 0 comments
Open

Add / Modify biconnected components #4

akcube opened this issue Dec 20, 2022 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request to-add

Comments

@akcube
Copy link
Collaborator

akcube commented Dec 20, 2022

The biconnected components template is pretty neat to quickly get the components, but constructing the block-cut tree isn't very trivial using them. Maybe add some text in notebook / add code to construct the relevant trees using BiconnectedComponents.h.

The callback passed to bicomps to get the bcc's is very un-intuitive. Add a small compute function to generate it from an edgelist (it's in the comments, move it to code).

int eid = 0; ed.resize(N); // global adj list, bcc uses. Maybe move to namespace / modify flow?
for each edge (a,b) {
    ed[a].emplace_back(b, eid); ed[b].emplace_back(a, eid++); 
}
bicomps([\&](const vi\& edgelist) {...}); // edgelist contains the *edges* in each biconnected component.
@akcube akcube added documentation Improvements or additions to documentation enhancement New feature or request to-add labels Dec 20, 2022
@akcube akcube self-assigned this Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request to-add
Projects
None yet
Development

No branches or pull requests

1 participant