Representing graphs (lists of edges, adjacency matrices, adjacency lists...)
Jeronimo Pellegrini 14 Aug 2022 23:36 UTC
Hello,
I like this SRFI and the fact that it is minimalistic!
However, I was wondering it it's ok to implicitly settle on
a specific representation of graphs (list of edges).
One could need to use adjacency matrices (or some other
method), for example, to have O(1) access when doing
computations. As a second example, I could want to do
topological sorting on the same graph for which I'd also
compute the Laplacian matrix. I don't mean using other ways
to represent graphs is better -- the list of edges is really
simple and Lispy, and it would be nice to choose either this
representation or hash tables/matrices/etc, just like we can
choose between alists and hash tables.
J.