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

Implement "cleanup" method #36

Closed
leotrs opened this issue Jan 13, 2022 · 6 comments
Closed

Implement "cleanup" method #36

leotrs opened this issue Jan 13, 2022 · 6 comments

Comments

@leotrs
Copy link
Collaborator

leotrs commented Jan 13, 2022

Make sure the documentation highlights the fact that the user should remember to call remove_isolates and other related functions.
Implement a cleanup method that performs various common clean up tasks, see comment down thread.

@leotrs
Copy link
Collaborator Author

leotrs commented Jan 20, 2022

#39 implements remove_isolates

@leotrs
Copy link
Collaborator Author

leotrs commented Jan 20, 2022

Other ideas for 2 cleanup method: remove isolates, extract largest component, remove duplicate/multi edges, relabel the node ids.

@nwlandry
Copy link
Collaborator

So you're saying that we have a cleanup method that does these four steps? I like that idea and also we should add the possibility to collapse loopy hyperedges.

@leotrs
Copy link
Collaborator Author

leotrs commented Jan 21, 2022

So you're saying that we have a cleanup method that does these four steps?

We don't have it yet, but I want to implement it.

I like that idea and also we should add the possibility to collapse loopy hyperedges.

Good catch!

@leotrs
Copy link
Collaborator Author

leotrs commented Apr 12, 2022

For now I think it'd be nice to have something like the following:

class Hypergraph:
    ...
    def cleanup(self):
        self.remove_isolates()
        self.remove_singletons()
        self.collapse_loopy_edges()    # not implemented yet
        self.remove_duplicates()       # not implemented yet
        self.relabel_nodes()           # not implemented yet
    ...

What other operations should cleanup perform?

@leotrs leotrs changed the title Write some documentation about "cleaning up" the graph Implement "cleanup" method Apr 20, 2022
@leotrs
Copy link
Collaborator Author

leotrs commented Sep 5, 2022

Closed by #161

@leotrs leotrs closed this as completed Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants