Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

graph_generators.h File Reference

Declaration of graph generators. More...

Go to the source code of this file.

Namespaces

 ogdf
 The namespace for all OGDF objects.
 

Functions

Randomized graph generators
void ogdf::randomRegularGraph (Graph &G, int n, int d)
 Creates a random d-regular graph. This method is not guaranteed to terminate! More...
 
void ogdf::randomGraph (Graph &G, int n, int m)
 Creates a random graph. More...
 
bool ogdf::randomSimpleGraph (Graph &G, int n, int m)
 Creates a random simple graph. More...
 
void ogdf::randomBiconnectedGraph (Graph &G, int n, int m)
 Creates a random biconnected graph. More...
 
void ogdf::planarConnectedGraph (Graph &G, int n, int m)
 Creates a random connected (simple) planar (embedded) graph. More...
 
void ogdf::planarBiconnectedGraph (Graph &G, int n, int m, bool multiEdges=false)
 Creates a random planar biconnected (embedded) graph. More...
 
void ogdf::planarBiconnectedDiGraph (Graph &G, int n, int m, double p=0, bool multiEdges=false)
 Creates a random planar biconnected acyclic (embedded) digraph. More...
 
void ogdf::upwardPlanarBiconnectedDiGraph (Graph &G, int n, int m)
 Creates a random upward planar biconnected (embedded) digraph. More...
 
void ogdf::planarCNBGraph (Graph &G, int n, int m, int b)
 Creates a random planar graph, that is connected, but not biconnected. More...
 
void ogdf::randomTriconnectedGraph (Graph &G, int n, double p1, double p2)
 Creates a random triconnected (and simple) graph. More...
 
void ogdf::planarTriconnectedGraph (Graph &G, int n, int m)
 Creates a random planar triconnected (and simple) graph. More...
 
void ogdf::planarTriconnectedGraph (Graph &G, int n, double p1, double p2)
 Creates a random planar triconnected (and simple) graph. More...
 
void ogdf::randomTree (Graph &G, int n)
 Creates a random tree (simpler version. More...
 
void ogdf::randomTree (Graph &G, int n, int maxDeg, int maxWidth)
 Creates a random tree. More...
 
void ogdf::randomHierarchy (Graph &G, int n, int m, bool planar, bool singleSource, bool longEdges)
 Creates a random hierarchical graph. More...
 
void ogdf::randomClusterPlanarGraph (ClusterGraph &C, Graph &G, int cNum)
 Assigns random clusters to a given graph G. More...
 
void ogdf::randomClusterGraph (ClusterGraph &C, Graph &G, int cNum)
 Assigns random clusters to a given graph G. More...
 
void ogdf::randomClusterGraph (ClusterGraph &C, const Graph &G, const node root, int moreInLeaves)
 Assigns a specified cluster structure to a given graph G, and assigns vertices to clusters. More...
 
void ogdf::randomDiGraph (Graph &G, int n, double p)
 Creates a random (simple) directed graph. More...
 
void ogdf::randomSeriesParallelDAG (Graph &G, int edges, double p=0.5, double flt=0.0)
 Creates a random (simple, biconnected) series parallel DAG. More...
 
void ogdf::randomGeometricCubeGraph (Graph &G, int nodes, double threshold, int dimension=2)
 Creates a random geometric graph by laying out nodes in a unit n-cube. Nodes with a distance < threshold are connected, 0 <= threshold <= sqrt(dimension). The graph is simple. More...
 
Deterministic graph generators
void ogdf::customGraph (Graph &G, int n, List< std::pair< int, int >> edges, Array< node > &nodes)
 Creates a custom graph using a list of pairs to determine the graph's edges. More...
 
void ogdf::customGraph (Graph &G, int n, List< std::pair< int, int >> edges)
 Creates a custom graph using a list of pairs to determine the graph's edges. More...
 
void ogdf::circulantGraph (Graph &G, int n, Array< int > jumps)
 Creates a circulant graph. More...
 
void ogdf::regularTree (Graph &G, int n, int children)
 Creates a regular tree. More...
 
void ogdf::completeGraph (Graph &G, int n)
 Creates the complete graph K_n. More...
 
void ogdf::completeKPartiteGraph (Graph &G, const Array< int > &signature)
 Creates the complete k-partite graph K_{k1,k2,...,kn}. More...
 
void ogdf::completeBipartiteGraph (Graph &G, int n, int m)
 Creates the complete bipartite graph K_{n,m}. More...
 
void ogdf::wheelGraph (Graph &G, int n)
 Creates the graph W_n: A wheel graph. More...
 
void ogdf::cubeGraph (Graph &G, int n)
 Creates the graph Q^n: A n-cube graph. More...
 
void ogdf::suspension (Graph &G, int s)
 Modifies G by adding its n-th suspension. More...
 
void ogdf::gridGraph (Graph &G, int n, int m, bool loopN, bool loopM)
 Creates a (toroidal) grid graph on n x m nodes. More...
 
void ogdf::petersenGraph (Graph &G, int n, int m)
 Creates a generalized Petersen graph. More...
 
void ogdf::emptyGraph (Graph &G, int nodes)
 Creates a graph with nodes nodes and no edges. More...
 

Detailed Description

Declaration of graph generators.

Author
Carsten Gutwenger, Markus Chimani
License:
This file is part of the Open Graph Drawing Framework (OGDF).
Copyright (C)
See README.md in the OGDF root directory for details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 or 3 as published by the Free Software Foundation; see the file LICENSE.txt included in the packaging of this file for details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/copyleft/gpl.html

Definition in file graph_generators.h.