Message Boards Message Boards

0
|
26 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Time to Extract Vertex Coordinates from a Graph

I am making large graphs (>400000 vertices) of modest density (6% possible edges). I am embedding them in 2d with the spring-electric embedding and need the coordinates. It runs, what appears to me to be quite slowly. Any thoughts. Note I would have embedded the example notebook, but it was too large. Note this is my first post, so apologies for errors in protocol. Thank you.

ClearSystemCache[]

Timing[g=RandomGraph[{400000,24000000}]]

Timing[g=Graph[g, GraphLayout->"SpringElectricalEmbedding"];]

Timing[vertexLocations=ResourceFunction["VertexCoordinateList"][g];]

Out[6]= {1.95313,Graph[Vertex count: 400000, Edge count: 24000000]}

Out[7]= {0.,Null}

Out[8]= {67.6563,Null}

POSTED BY: Robert Lipshutz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract