Skip to content

atrsp/Sparse_Matrices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sparse_Matrices

A College Work designed to solve basic operations with Sparse Matrices.

It also works for Dense Matrices, even though it's NOT the most optimized use of memory to treat them.

These images exemplify how the Linked Lists were stored:

This is the Sparce Matrix we'll analyze:

image

This is how it's structured in this program, by using linked lists:

WhatsApp Image 2023-05-23 at 16 33 45

Operations included:

1. Insertion of values in a Matrix;
2. Sum of Matrices;
3. Multiplication of Matrices;
4. Multiplication of Matrices (cell per cell);
5. Multiplication of a Matrix per a scalar;
6. Swap Lines;
7. Swap Columns;
8. Slice a Matrix;
9. Transpose a Matrix;
10. Print a Matrix in a binary file;
11. Read a Matrix from a binary file (according to this program's specifications);
12. Convolution of Matrices;
13. Print Dense Matrix;
14. Print Sparse Matrix;
15. Sum all the cells from a Matrix.
There are more functions in the code, which we're used to develop these operations.

This code has comments regarding:

- The complexity of the functions (using the O notation);
- Expected outputs from each main program.

About

Resolves basic operations with sparse matrices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published