Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

randomized.h
Go to the documentation of this file.
1 
32 #pragma once
33 
37 
38 namespace ogdf {
39 
45 
49 
56 OGDF_EXPORT void randomRegularGraph(Graph &G, int n, int d);
57 
59 
64 OGDF_EXPORT void randomGraph(Graph &G, int n, int m);
65 
67 
72 OGDF_EXPORT bool randomSimpleGraph(Graph &G, int n, int m);
73 
75 
86 OGDF_EXPORT bool randomSimpleGraphByProbability(Graph &G, int n, double pEdge);
87 
89 
94 OGDF_EXPORT bool randomSimpleConnectedGraph(Graph &G, int n, int m);
95 
97 
105 OGDF_EXPORT void randomBiconnectedGraph(Graph &G, int n, int m);
106 
108 
116 OGDF_EXPORT void randomPlanarConnectedGraph(Graph &G, int n, int m);
117 
119 
129 OGDF_EXPORT void randomPlanarBiconnectedGraph(Graph &G, int n, int m, bool multiEdges = false);
130 
132 
144 OGDF_EXPORT void randomPlanarBiconnectedDigraph(Graph &G, int n, int m, double p = 0, bool multiEdges = false);
145 
147 
155 OGDF_EXPORT void randomUpwardPlanarBiconnectedDigraph(Graph &G, int n, int m);
156 
158 
166 OGDF_EXPORT void randomPlanarCNBGraph(Graph &G, int n, int m, int b);
167 
169 
196 OGDF_EXPORT void randomTriconnectedGraph(Graph &G, int n, double p1, double p2);
197 
199 
218 OGDF_EXPORT void randomPlanarTriconnectedGraph(Graph &G, int n, int m);
219 
221 
238 OGDF_EXPORT void randomPlanarTriconnectedGraph(Graph &G, int n, double p1, double p2);
239 
241 
245 OGDF_EXPORT void randomTree(Graph& G, int n);
246 
248 
255 OGDF_EXPORT void randomTree(Graph &G, int n, int maxDeg, int maxWidth);
256 
258 
267 OGDF_EXPORT void randomClusterPlanarGraph(ClusterGraph &C,Graph &G,int cNum);
268 
270 
277 OGDF_EXPORT void randomClusterGraph(ClusterGraph &C,Graph &G,int cNum);
278 
280 
294 OGDF_EXPORT void randomClusterGraph(ClusterGraph& C, const Graph& G, const node root, int moreInLeaves);
295 
297 
302 OGDF_EXPORT void randomDigraph(Graph &G, int n, double p);
303 
305 
317 OGDF_EXPORT void randomSeriesParallelDAG(Graph &G, int edges, double p = 0.5, double flt = 0.0);
318 
322 
328 OGDF_EXPORT void randomGeometricCubeGraph(Graph &G, int nodes, double threshold, int dimension = 2);
329 
332 
349 OGDF_EXPORT void randomWaxmanGraph(Graph &G, int nodes, double alpha, double beta, double width = 1.0, double height = 1.0);
350 
352 
368 OGDF_EXPORT void preferentialAttachmentGraph(Graph &G, int nodes, int minDegree);
369 
371 
387 OGDF_EXPORT void randomWattsStrogatzGraph(Graph &G, int n, int k, double probability);
388 
390 
412 OGDF_EXPORT void randomChungLuGraph(Graph &G, Array<int> expectedDegreeDistribution);
413 
415 
428 OGDF_EXPORT void randomEdgesGraph(Graph &G, std::function<double(node, node)> probability);
429 
431 
434 }
void randomPlanarConnectedGraph(Graph &G, int n, int m)
Creates a random connected (simple) planar (embedded) graph.
void randomTree(Graph &G, int n)
Creates a random tree (simpler version.
void randomSeriesParallelDAG(Graph &G, int edges, double p=0.5, double flt=0.0)
Creates a random (simple, biconnected) series parallel DAG.
Derived class of GraphObserver providing additional functionality to handle clustered graphs...
void randomClusterGraph(ClusterGraph &C, Graph &G, int cNum)
Assigns random clusters to a given graph G.
void randomPlanarCNBGraph(Graph &G, int n, int m, int b)
Creates a random planar graph, that is connected, but not biconnected.
Declaration of the Random Hierarchy graph generator.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Implements graph generator for random geographical threshold graphs.
void randomPlanarBiconnectedDigraph(Graph &G, int n, int m, double p=0, bool multiEdges=false)
Creates a random planar biconnected acyclic (embedded) digraph.
bool randomSimpleConnectedGraph(Graph &G, int n, int m)
Creates a random simple and connected graph.
bool randomSimpleGraphByProbability(Graph &G, int n, double pEdge)
Creates a random simple graph.
void preferentialAttachmentGraph(Graph &G, int nodes, int minDegree)
Creates a graph where new nodes are more likely to connect to nodes with high degree.
void randomWattsStrogatzGraph(Graph &G, int n, int k, double probability)
Creates a "small world" graph as described by Watts & Strogatz.
void randomRegularGraph(Graph &G, int n, int d)
Creates a random d-regular graph.
void randomUpwardPlanarBiconnectedDigraph(Graph &G, int n, int m)
Creates a random upward planar biconnected (embedded) digraph.
NodeElement * node
The type of nodes.
Definition: Graph_d.h:63
void randomPlanarBiconnectedGraph(Graph &G, int n, int m, bool multiEdges=false)
Creates a random planar biconnected (embedded) graph.
void randomGraph(Graph &G, int n, int m)
Creates a random graph.
void randomChungLuGraph(Graph &G, Array< int > expectedDegreeDistribution)
Creates a graph where edges are inserted based on given weights.
void randomEdgesGraph(Graph &G, std::function< double(node, node)> probability)
Inserts edges into the given graph based on probabilities given by a callback function.
void randomClusterPlanarGraph(ClusterGraph &C, Graph &G, int cNum)
Assigns random clusters to a given graph G.
void randomBiconnectedGraph(Graph &G, int n, int m)
Creates a random biconnected graph.
void randomWaxmanGraph(Graph &G, int nodes, double alpha, double beta, double width=1.0, double height=1.0)
Generates a Waxman graph where nodes are uniformly randomly placed in a grid, then edges are inserted...
The namespace for all OGDF objects.
void randomDigraph(Graph &G, int n, double p)
Creates a random (simple) directed graph.
bool randomSimpleGraph(Graph &G, int n, int m)
Creates a random simple graph.
void randomTriconnectedGraph(Graph &G, int n, double p1, double p2)
Creates a random triconnected (and simple) graph.
void 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 < thresh...
void randomPlanarTriconnectedGraph(Graph &G, int n, int m)
Creates a random planar triconnected (and simple) graph.