Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

gen-acyclic-graph.cpp
Go to the documentation of this file.
1 #include <ogdf/basic/Graph.h>
5 #include <string>
6 
7 using namespace ogdf;
8 
9 int main()
10 {
11  Graph G;
12  randomSimpleGraph(G, 10, 20);
13 
15  DAS.callAndReverse(G);
16 
17  GraphIO::write(G, "output-acyclic-graph.gml", GraphIO::writeGML);
18 
19  return 0;
20 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
graph_generators.h
Declaration of graph generators.
ogdf::GraphIO::write
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.
ogdf::GraphIO::writeGML
static bool writeGML(const Graph &G, std::ostream &os)
Writes graph G in GML format to output stream os.
GraphIO.h
Declares class GraphIO which provides access to all graph read and write functionality.
main
int main()
Definition: gen-acyclic-graph.cpp:9
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::DfsAcyclicSubgraph
DFS-based algorithm for computing a maximal acyclic subgraph.
Definition: DfsAcyclicSubgraph.h:47
DfsAcyclicSubgraph.h
Declaration of class DfsAcyclicSubgraph.
ogdf::AcyclicSubgraphModule::callAndReverse
void callAndReverse(Graph &G, List< edge > &reversed)
Makes G acyclic by reversing edges.
ogdf::randomSimpleGraph
bool randomSimpleGraph(Graph &G, int n, int m)
Creates a random simple graph.