Skip to content

Latest commit

 

History

History
34 lines (16 loc) · 1.46 KB

README.md

File metadata and controls

34 lines (16 loc) · 1.46 KB

Sparse Matrix Operations

Sparse matrices are a special type of data structure where most of the values are zero. These matrices find applications in various fields, such as graphics, simulations, and neural networks, due to their memory-efficient representation. This project implements operations on sparse matrices using a two-dimensional linked list data structure.

Overview

This project provides a C++ implementation of various operations on sparse matrices, including:

Reading a Sparse Matrix: Reading a sparse matrix from a text file and storing it as a 2D linked list.

Printing a Sparse Matrix: Printing the sparse matrix to the console, including zero values.

Deleting a Sparse Matrix: Deallocating memory associated with a sparse matrix.

Checking Symmetry: Determining if a sparse matrix is symmetric.

Transpose: Finding the transpose of a sparse matrix.

Adding Sparse Matrices: Adding two sparse matrices of the same dimensions.

Implementation Details

This project employs a 2D linked list data structure to represent sparse matrices. It uses two types of nodes: row_node and cell_node. These nodes are linked together to create the matrix's structure efficiently.

The provided main.cpp file contains a sample program that demonstrates how to use the implemented functions to perform operations on sparse matrices.


Note

This project was developed as a programming assignment and serves as an educational resource for working.