Skip to content

Initial support for sparse matrix representation of H-polytopes#39

Open
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
ChinmayRout9040895625:develop
Open

Initial support for sparse matrix representation of H-polytopes#39
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
ChinmayRout9040895625:develop

Conversation

@ChinmayRout9040895625
Copy link

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 matrices
4- 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!

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.

1 participant