Re: [jgrapht-developers] dumping adjacency and laplacian matrices
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2005-12-14 09:31:50
|
Another possibility is a parameter telling the exporter whether to ignore/collapse vs. assert on detecting a loop or multi-edge. It would be nice if there were a way to query a graph for these properties. In the case where they were not being enforced by the graph implementation itself, the query would actually inspect the graph content; in case the graph already knows this inspection could be short-circuited. Arranging this communication in a generic way so that we don't end up with an explosion of interface combinations is the tricky part. Yet another enhancement request? JVS On Tue, 2005-12-13 at 19:04 -0500, Charles Fry wrote: > Now that I'm getting a little deeper into this, I realized that a > Laplacian matrix is only defined for "an undirected, unweighted graph > without graph loops (i,i) or multiple edges from one node to another [1]." > > 1. http://mathworld.wolfram.com/LaplacianMatrix.html > > Currently there are interfaces for Directed and Undirected graphs, but > no interfaces are used to mark Multigraphs or Pseudographs. It is thus > impossible for me to tell beforehand whether or not the graph provided > contains loops or multiple edges. > > The possible solutions that I see to this are to: > > - Define interfaces that indicate when multiple edges or loops are > permitted in a graph, and explicitely check those, possibly issuing a > warning. > > - Ignore loops, and collapse multiple edges when creating the Laplacian > matrix. > > I don't see any reason not to do the latter, although the former may > still be beneficial for other reasons. > > Thoughts? > > Charles > |