Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
subgraph-planarizer.cpp
Go to the documentation of this file.
6
7using namespace ogdf;
8
9int main()
10{
11 Graph G;
12 randomSimpleGraph(G, 100, 150);
13
17
18 int crossNum;
19 PlanRep PR(G);
20 SP.call(PR, 0, crossNum);
21
22 std::cout << crossNum << " crossings" << std::endl;
23 GraphIO::write(PR, "output-plan.gml", GraphIO::writeGML);
24
25 return 0;
26}
Declares class GraphIO which provides access to all graph read and write functionality.
Declaration of the PlanarSubgraphFast.
Declaration of class SubgraphPlanarizer.
Declaration of class VariablEmbeddingInserter.
ReturnType call(PlanRep &pr, int cc, int &crossingNumber, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr)
Computes a planarized representation of the input graph.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
static bool write(const Graph &G, const string &filename, WriterFunc writer=nullptr)
Writes graph G to a file with name filename and infers the format to use from the file's extension.
static bool writeGML(const Graph &G, std::ostream &os)
Writes graph G in GML format to output stream os.
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:57
Computation of a planar subgraph using PQ-trees.
The planarization approach for crossing minimization.
void setInserter(EdgeInsertionModule *pInserter)
Sets the module option for the edge insertion module.
void setSubgraph(PlanarSubgraphModule< int > *pSubgraph)
Sets the module option for the computation of the planar subgraph.
Optimal edge insertion module.
Declaration of graph generators.
bool randomSimpleGraph(Graph &G, int n, int m)
Creates a random simple graph.
The namespace for all OGDF objects.
int main()