Skip to content

RezaGooner/Sparse-Matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Sparse Matrix Representation in C++

This repository contains an implementation of a Sparse Matrix in C++. It demonstrates efficient storage and manipulation of sparse matrices, which are matrices primarily filled with zeros. This is achieved using compact representations, such as storing only non-zero elements with their respective row and column indices.

Features

Compact Storage
Efficient Memory Usage
🔧 Basic Operations Support

  • Addition
  • Scalar Multiplication
  • Matrix Multiplication

Requirements

  • C++ Compiler (e.g., GCC)
  • Operating System: Cross-platform (Windows, Linux, macOS)

How to Use

  1. Clone the repository:
git clone https://github.com/RezaGooner/Sparse-Matrix.git
  1. Navigate to the project folder and compile the code:
g++ Sparse\ Matrix.cpp -o sparse_matrix
./sparse_matrix

Example Output

The program performs operations on a sparse matrix and prints the results.

License

Distributed under the Apache 2.0 License.