Skip to content
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

Add "Sparse Matrix Compression" Algorithm in C++ #2903

Open
MQ-06 opened this issue Nov 17, 2024 · 2 comments
Open

Add "Sparse Matrix Compression" Algorithm in C++ #2903

MQ-06 opened this issue Nov 17, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MQ-06
Copy link

MQ-06 commented Nov 17, 2024

Detailed description

Description

Sparse matrices are matrices with a majority of zero values. Compressing such matrices optimizes storage and computation, which is essential for various scientific and engineering applications.

Details

  • Language: C++
  • Operation: Sparse Matrix Compression
  • Key Features:
    • Identify and store only non-zero elements.
    • Support for efficient retrieval of original matrix values.
    • Provide both row-major and column-major compression techniques.

Approach

  1. Create a new file named SparseMatrixCompression.cpp.
  2. Implement the following methods:
    • Compress Sparse Matrix: Store only non-zero elements with their indices.
    • Decompress to Original Matrix: Reconstruct the original matrix from the compressed form.
  3. Add test cases to validate the compression and decompression functions.

References

Context

Benefits

  • Reduces memory usage for large sparse matrices.
  • Enhances computational efficiency for operations on sparse matrices.
  • Useful for solving problems in areas like machine learning, finite element analysis, and computer graphics.
  • Provides other users with an optimized, ready-to-use solution for handling large-scale sparse data, improving both performance and scalability in their applications.

Possible implementation

No response

Additional information

No response

@MQ-06 MQ-06 added the enhancement New feature or request label Nov 17, 2024
vrtarimala added a commit to vrtarimala/C-Plus-Plus that referenced this issue Dec 14, 2024
Copy link
Contributor

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Dec 18, 2024
@vrtarimala
Copy link

I have made a PR to add this functionality: #2910

@github-actions github-actions bot removed the stale Author has not responded to the comments for over 2 weeks label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants