Initial support for sparse matrix representation of H-polytopes#39
Open
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
Open
Initial support for sparse matrix representation of H-polytopes#39ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
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
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.
This PR introduces the initial infrastructure required to support sparse matrix representations of H-polytopes in Rvolesti. While the volesti C++ backend already supports sparse matrices, the R interface currently lacks a pathway for handling sparse inputs efficiently.
The changes focus on enabling R-to-C++ transfer of sparse matrices using RcppEigen and preparing the package for future integration with the sparse polytope backend.
Changes
1- Updated S4 class definitions to allow sparse matrix storage where appropriate
2- Added dependency on the Matrix package for sparse matrix support
3- Linked RcppEigen to enable automatic conversion of R sparse matrices (e.g.,
dgCMatrix) to Eigen sparse matrices4- Implemented a minimal C++ wrapper (
create_sparse_hpolytope) to verify successful transfer of sparse matrices from R to C++5- Added basic tests for sparse input handling
Notes
1- This PR does not yet connect to the full volesti sparse polytope implementation; it establishes the foundational infrastructure required for that integration.
2- Existing functionality for dense H-polytopes remains unchanged.
3- Backward compatibility is preserved.
Supporting sparse matrices is important for high-dimensional polytopes where the constraint matrix is largely sparse. This can significantly improve memory usage and computational efficiency for large-scale problems.
Future work will focus on:
1- Constructing volesti sparse polytope objects from the transferred matrices
2- Extending sampling and volume estimation functions to support sparse inputs
3- Performance validation against dense representations
Related Issue
Closes/Relates to: #29 (Support sparse matrices to represent H-polytopes)
Thank You!