LEMON implements various such auxiliary tools. For instance, several data structures are available for maintaining disjoint sets. UnionFind is the classical union-find data structure, which is used to implement the Kruskal algorithm. The UnionFindEnum and HeapUnionFind classes are used in matching algorithms, the first one supports the enumeration of the items stored in the sets, while the second one also assigns priorities to the elements and an item having minimum priority can be retrieved set-wise.
graphToEps(g, "graph.eps") .coords(coords) .title("Sample EPS figure") .copyright("(c) 2003-2010 LEMON Project") .absoluteNodeSizes().absoluteArcWidths() .nodeScale(2).nodeSizes(sizes) .nodeShapes(shapes) .nodeColors(composeMap(palette, colors)) .arcColors(composeMap(palette, acolors)) .arcWidthScale(.4).arcWidths(widths) .nodeTexts(id).nodeTextSize(3) .run();
Using this feature, various nice images can be generated from graphs, like this one.
For more examples, see graph_to_eps_demo.cc in the demo directory of the LEMON source.
<< 11 LEMON Graph Format | Home | 13 gLemon >>