Skip to content

It is about implementation of a Sparse array and matrix (2D) which helps in saving memory and time espically when there is a lot of unused wasted memory.

Notifications You must be signed in to change notification settings

fatema123elfiky/Sparse-array-and-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Sparse-array-and-matrix

It is about implementation of a Sparse array and matrix (2D) which helps in saving memory and time espically when there is a lot of unused wasted memory.

Sparse array 1D

It's a data structure used espacially when there is a lot of unused memory and some only is used which may not be avaliable all the time. So , I made a container which uses only the determined values saving the wasted memory and that is so useful espically in the polynomial functions. it is a good example for the problem and that data structure solves that problem.

Key features :

  1. printing the array
  2. printing non zero elements in array
  3. adding two arrays
  4. setting values in the array
  5. getting values from the array

Sparse matrix 2D

It's a datastructure and the mostly used in industry . the same idea saves a lot of memory of wasted unused spaces . but the key difference that one for a grid which have columns and rows. So , another one of the same problem in a differen way solved by that datastructure . to make that datastructure i have used the previous one and that make sense the idea differs because of the implementation of the functions differs.

Key features :

  1. printing the 2D array
  2. printing the 2D array with non zero elements only
  3. adding two matrices
  4. setting values for the matrix
  5. getting values from the matrix by row and column
***small note the containers are zero based

About

It is about implementation of a Sparse array and matrix (2D) which helps in saving memory and time espically when there is a lot of unused wasted memory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages