Skip to content

YT-CPPHGL-9: Introduce storage layout tags to define the layout of incidence list and matrix representation models#67

Merged
SpectraL519 merged 3 commits into
hgl-masterfrom
impl-layout
Dec 6, 2025
Merged

YT-CPPHGL-9: Introduce storage layout tags to define the layout of incidence list and matrix representation models#67
SpectraL519 merged 3 commits into
hgl-masterfrom
impl-layout

Conversation

@SpectraL519
Copy link
Copy Markdown
Owner

@SpectraL519 SpectraL519 commented Dec 6, 2025

  • Defined new vertex_major_t and hyperedge_major_t implementation layout tags with utility methods for retrieving the major and minor elements
  • Replaced the current implementation tags with template list_t and matrix_t tags parametrized with a storage layout tag
  • Merged the undirected_hyperedge_list and undirected_vertex_list classes into a single template class undirected_incidence_list<LayoutTag>
  • Add a LayoutTag template parameter to the unidrected_incidence_matrix class and aligned its implementation to use layout-dependent behaviour
  • Aligned the hypergraph_traits type and related utility to use the new tags

Copilot AI review requested due to automatic review settings December 6, 2025 16:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces storage layout tags (vertex_major_t and hyperedge_major_t) to parameterize hypergraph implementation models, enabling unified handling of different storage layouts for incidence lists and matrices.

Key Changes:

  • Introduced layout tag infrastructure with vertex_major_t and hyperedge_major_t providing utility methods for layout-aware element access
  • Unified undirected_hyperedge_list and undirected_vertex_list into a single template undirected_incidence_list<LayoutTag>
  • Updated undirected_incidence_matrix with layout tag parameterization for flexible row/column orientation

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
include/hgl/impl/layout_tags.hpp Defines new vertex_major_t and hyperedge_major_t layout tags with utility methods
include/hgl/impl/impl_tags.hpp Updates implementation tags to template-based list_t and matrix_t parameterized by layout tags
include/hgl/impl/incidence_list.hpp New unified incidence list implementation replacing separate vertex and hyperedge list classes
include/hgl/impl/incidence_matrix.hpp Updated incidence matrix with layout tag template parameter and layout-dependent operations
include/hgl/hypergraph_traits.hpp Updated traits aliases to use new parameterized implementation tags
tests/source/hgl/test_incidence_list.cpp New test file for unified incidence list implementation covering both layout variants
tests/source/hgl/test_incidence_matrix.cpp Extended tests to cover both vertex-major and hyperedge-major matrix layouts
tests/source/hgl/test_hypergraph.cpp Updated test instantiations to include all layout and implementation combinations
tests/source/hgl/test_vertex_list.cpp Removed (functionality merged into test_incidence_list.cpp)
tests/source/hgl/test_hyperedge_list.cpp Removed (functionality merged into test_incidence_list.cpp)
include/hgl/impl/vertex_list.hpp Removed (replaced by incidence_list.hpp)
include/hgl/impl/hyperedge_list.hpp Removed (replaced by incidence_list.hpp)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Comment thread tests/source/hgl/test_incidence_list.cpp Outdated
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
hgl::types::name_property,
hgl::types::name_property>, // undirected hyperedge list
hgl::hyperedge_list_hg_traits<
hgl::types::name_property>, // undirected hyperedge-major incicence list
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "incicence" should be "incidence"

Copilot uses AI. Check for mistakes.
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Comment thread tests/source/hgl/test_hypergraph.cpp Outdated
Copy link
Copy Markdown
Owner Author

@SpectraL519 SpectraL519 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@SpectraL519 SpectraL519 merged commit b4f30c9 into hgl-master Dec 6, 2025
3 checks passed
@SpectraL519 SpectraL519 deleted the impl-layout branch December 6, 2025 17:03
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

Successfully merging this pull request may close these issues.

2 participants