Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
gen-acyclic-graph.cpp
Go to the documentation of this file.
4
5using namespace ogdf;
6
7int main()
8{
9 Graph G;
10 randomSimpleGraph(G, 10, 20);
11
13 DAS.callAndReverse(G);
14
15 GraphIO::write(G, "output-acyclic-graph.gml", GraphIO::writeGML);
16
17 return 0;
18}
Declaration of class DfsAcyclicSubgraph.
Declares class GraphIO which provides access to all graph read and write functionality.
void callAndReverse(Graph &G, List< edge > &reversed)
Makes G acyclic by reversing edges.
DFS-based algorithm for computing a maximal acyclic subgraph.
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.
int main()
Declaration of graph generators.
bool randomSimpleGraph(Graph &G, int n, int m)
Creates a random simple graph.
The namespace for all OGDF objects.