In college they asked us to design a matrix representation that will behave well for sparse matrices and also will need to have common operations such as multiplication and sumation in addition to gaussian eilimination.
I've though that one structure that would fit well this model is a: vector of rows, where every row is a map of (column, value)
This would allow me to do row permutations easily, and would also consume little space since we store the columns of the rows as a map.
However I'm starting to think there could be a better way.
Maybe a map of maps?
what do you think?
Thanks!
Aucun commentaire:
Enregistrer un commentaire