1#include <ogdf/energybased/FMMMLayout.h>
2#include <ogdf/fileformats/GraphIO.h>
3
4using namespace ogdf;
5
6int main()
7{
8 Graph G;
9 GraphAttributes GA(G);
10 if (!GraphIO::read(G, "sierpinski_04.gml")) {
11 std::cerr << "Could not load sierpinski_04.gml" << std::endl;
12 return 1;
13 }
14
15 for (node v : G.nodes)
16 GA.width(v) = GA.height(v) = 10.0;
17
18 FMMMLayout fmmm;
19
20 fmmm.useHighLevelOptions(true);
21 fmmm.unitEdgeLength(15.0);
22 fmmm.newInitialPlacement(true);
23 fmmm.qualityVersusSpeed(FMMMOptions::QualityVsSpeed::GorgeousAndEfficient);
24
25 fmmm.call(GA);
26 GraphIO::write(GA, "output-energybased-sierpinski-layout.gml", GraphIO::writeGML);
27
28 return 0;
29}
30