Skip to content

Implemented operations on a very special type of data structure – a sparse matrix.

Notifications You must be signed in to change notification settings

ecetsn/Sparse-Matrices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Implemented operations on a very special type of data structure – a sparse matrix.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages