-
Notifications
You must be signed in to change notification settings - Fork 32
Refactored code common to all core classes #44
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
Open
IsaacFigNewton
wants to merge
19
commits into
HGX-Team:master
Choose a base branch
from
IsaacFigNewton:fixing_refactoring_directed_hypergraph
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactored code common to all core classes #44
IsaacFigNewton
wants to merge
19
commits into
HGX-Team:master
from
IsaacFigNewton:fixing_refactoring_directed_hypergraph
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
added metadata field to DirectedHypergraph class
fixed logic bug in check_node() switched get_nodes() to access node metadata in a more standardized fashion
still getting 34 failed tests due to TypeErrors and unwrapped edges
moved _canon_edge() implementation to i_undirected_graph from i_hypergraph fixed parameters in set_attr_to_edge_metadata, remove_attr_from_edge_metadata in i_hypergraph made a seperate _canon_edge method for directed_hypergraph
re-tested to ensure clean starting state before interface reintegration
implemented abstract methods for each class
Refactored TemporalHypergraph to inherit from IHypergraph instead of IUndirectedHypergraph streamlined node and edge management improved type annotations reorganized methods for clarity and maintainability. updated temporal-specific methods, metadata handling, serialization support, and utility functions. removed redundant code and improved docstrings for better usability.
delegated more logic to the IHypergraph consolidated node and edge management improving metadata handling, reorganizing utility and analysis methods. removed redundant methods docstrings were updated for consistency just need to debug hashing tests
Standardize edge metadata storage to use edge keys instead of edge IDs across IHypergraph and all derived classes. Update method signatures and internal logic for edge addition, removal, and metadata access to ensure consistent handling of edge metadata. Improve type annotations and initialization for edge-related attributes. Almost fully functionaly
Refactored the Hypergraph class to inherit from IUndirectedHypergraph Abstract methods for edge and node management are now implemented in Hypergraph, and shared methods such as adjacency, neighbor, and weight management are centralized in the base class. This improves code maintainability and reduces duplication across undirected hypergraph implementations.
This looks very useful! Thanks a lot for working on it, it is very needed. I'll take some time to review the code (may be slow due to holidays) and reach out for further questions / merge the code:) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I created 2 interfaces with code shared across the different core Hypergraph classes.
Below is a Mermaid diagram indicating the inheritance hierarchy.
I've included detailed commit messages, as well as comments describing my changes.
The key differences in functionality now, though are: