Skip to content

YT-CPPHGL-8: Implement the undirected incidence-matrix model#66

Merged
SpectraL519 merged 1 commit into
hgl-masterfrom
undirected-inc-matrix
Dec 5, 2025
Merged

YT-CPPHGL-8: Implement the undirected incidence-matrix model#66
SpectraL519 merged 1 commit into
hgl-masterfrom
undirected-inc-matrix

Conversation

@SpectraL519
Copy link
Copy Markdown
Owner

Created the impl::undirected_incidence_matrix model class, which stores a VxE incidence matrix and defines the following operations:

  • Adding and removing vertices
  • Adding and removing hyperedges
  • Binding and unbinding vertices to hyperedges
  • Retrieving the degree of a vertex
  • Retrieving the set of hyperedges incident with (containing) a given vertex
  • Retrieving the number of vertices incident with a given hyperedge
  • Retrieving the set of vertices incident with a given hyperedge

Copilot AI review requested due to automatic review settings December 5, 2025 20:39
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 implements the undirected_incidence_matrix model class for the HGL (HyperGraph Library) component of the CPP-GL project. The implementation provides a VxE (vertices by hyperedges) incidence matrix representation for undirected hypergraphs.

Key changes:

  • Added undirected_incidence_matrix class with vertex and hyperedge manipulation operations
  • Implemented binding operations to manage vertex-hyperedge relationships via a 2D boolean matrix
  • Created comprehensive test suite with 15 test cases covering all operations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
include/hgl/impl/incidence_matrix.hpp New implementation of the undirected incidence matrix model with operations for managing vertices, hyperedges, and their bindings using a 2D boolean matrix
tests/source/hgl/test_incidence_matrix.cpp Comprehensive test suite with 15 test cases covering initialization, vertex/hyperedge operations, binding operations, and edge cases with ID shifting

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

Comment thread tests/source/hgl/test_incidence_matrix.cpp Outdated
@SpectraL519 SpectraL519 force-pushed the undirected-inc-matrix branch from 898842a to 82b65da Compare December 5, 2025 20:44
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 c5d8e93 into hgl-master Dec 5, 2025
4 checks passed
@SpectraL519 SpectraL519 deleted the undirected-inc-matrix branch December 5, 2025 20:50
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