How to improve PlanarizationLayout call() method speed

37 views
Skip to first unread message

Deepak Jeron .A

unread,
Sep 14, 2023, 9:17:37 AM9/14/23
to ogdf
Hi, I have using PlanarizationLayout for creating like ERDG diagram with 165 node 525  edges. When I use this layout, It become execute nearly 1 min. Is there any alternative code for draw ERDG diagram ?

I used 
PlanarSubgraphFast<int> *ps = new PlanarSubgraphFast<int>;
VariableEmbeddingInserter *ves = new VariableEmbeddingInserter;
EmbedderMinDepthMaxFaceLayers *emb = new EmbedderMinDepthMaxFaceLayers;
SubgraphPlanarizer *sgp = new SubgraphPlanarizer;
OrthoLayout *ol = new OrthoLayout;
ClusterOrthoLayout *clol = new ClusterOrthoLayout;
PlanarizationLayout pl;
ps->runs(10);
ves->removeReinsert(RemoveReinsertType::All);
sgp->setSubgraph(ps);
sgp->setInserter(ves);
pl.setEmbedder(emb);
ol->separation(5.0);
ol->cOverhang(0.4);
pl.setPlanarLayouter(ol); 
pl.call(graphAttr);

Dagobert Smart

unread,
Sep 15, 2023, 2:38:41 PM9/15/23
to ogdf
Hello Deepak Jeron,

for an ERDG diagram you probably want to be able to still see relations between single nodes.
So you can try out something like a FMMMLayout but that may create too much clutter on a local level, e.g., many edges passing through non-incident nodes.

Rather, I'd try to still use PlanarizationLayout but with other planarization heuristics:
Instead of a `VariableEmbeddingInserter`, use a `FixedEmbeddingInserter`. This will probably result in more crossings but should be significantly faster. If that is not fast enough, you can also change the RemoveReinsertType to `RemoveReinsertType::Inserted` or even `RemoveReinsertType::None`.

Best regards,
Dagobert

Deepak Jeron .A

unread,
Sep 27, 2023, 3:10:44 AM9/27/23
to ogdf

cmake . -DBUILD_SHARED_LIBS=ON

make -j8

make install

g++ -I /usr/lib/jvm/java-11-openjdk-arm64/include -I /usr/lib/jvm/java-11-openjdk-arm64/include/linux  -lOGDF main.cpp -pthread -shared  -o libGLibERD.so -fPIC

Exception in thread "Thread1" java.lang.UnsatisfiedLinkError: /app/libGLibERD.so: /app/libGLibERD.so: undefined symbol: _ZN4ogdf23EmbedderMinDepthMaxFace6doCallERNS_5GraphERPNS_10AdjElementE

at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)

at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2450)

at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2506)

at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2705)

at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2635)

at java.base/java.lang.Runtime.load0(Runtime.java:768)

at java.base/java.lang.System.load(System.java:1850)

at .ERDGMain.<clinit>(ERDGMain.java:21)

I also tried extern "C" {}  but I have same error.  is there any flag to hide mangling functions

Reply all
Reply to author
Forward
0 new messages