سؤال

Graph drawing algorithms, such as those described here, check all the vertices two-by-two and apply additional forces if two vertices are connected by an edge. If we have a very large graph, checking all pairs of vertices would be costly. Is there any graph drawing algorithm that draws a large graph using only existing edges, not by verifying all possible pairs?

EDIT
By drawing algorithm, I meant an algorithm that assigns a 2D or 3D position to each vertex such that rendering spheres or circles (or any other shape) as vertices at their assigned positions lead to a plausible visual representation of the whole graph.

هل كانت مفيدة؟

المحلول

Check this Spring-Electrical Embedding It is in O(nlog n).

نصائح أخرى

If you have sparse matrix you can consider about creating graph as list of neighbours or simplier like pair of vertices (e.g. (1, 3) and 1 and 3 are the numbers of vertices).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top