I am currently working on some graph projects with a friend, and I would like to know if there is anyway to reduce the size taken by adjacency matrixes to save as many memory as possible.
I am assuming we need the Matrix representation as we need to compute flows and related stuf… But, maybe this can be done with adjacency list too…
If there’s any compression algorithm someone could point me out, I’d be very glad
You are dealing with sparse matrix (as you mentioned saving memory), There are various representations of sparse matrices like Yale format, Compressed sparse row/Compressed sparse column, Band matrix…You can choose any of these as per your requirement.