Open GiggleLiu opened 1 year ago
For directed graphs, we want to ignore directedness. We would need an efficient wrapper for that instead of allocating a new graph.
For directed graphs, we want to ignore directedness. We would need an efficient wrapper for that instead of allocating a new graph.
Sorry, I am not very familiar with directed graphs. Any comments on how to implement the suggested change?
We would need to write
if is_directed(g)
g = Graph(g)
end
before computing δ
, but this is dramatic for big graphs since it will fully allocate a new graph. We need here a wrapper around g
that simulates an undirected graph without allocating. This wrapper would be of general interest for Graphs.jl, so I will add it.
List of changes
In the paper "Graph Drawing by Stress Majorization", it is mentioned that the expect distance matrix![image](https://user-images.githubusercontent.com/6257240/210179344-be507448-4255-4ae1-a69e-af73f1220804.png)
δ
(or dij in the paper) should be the graph theoretical distance, rather than the uniform matrix implemented in the original implementation.The current implementation is also more than 10x faster for large graphs in my test case.
Example
The visualization of a chain like graph
Before the change
After the change