Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
clustering.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
36
37#include <cstdint>
38#include <iosfwd>
39
40namespace ogdf {
41
42class ClusterGraph;
43
44namespace sync_plan {
45class SyncPlan;
46}
47
50
53
55
63
65
71
73
86OGDF_EXPORT void randomClustering(ClusterGraph& C, const node root, int moreInLeaves);
87
91 int max_nodes_in_cluster = 0;
93 double prob_no_further_node = 0.1;
95 double prob_no_further_cluster = 0.0;
97 int max_clusters = 0;
99 int min_root_nodes = 0;
101 bool cconnected = false;
103 int timeout = 0;
104
106 double expected_nodes() const { return 1.0 / prob_no_further_node; }
107
109 void expected_nodes(double n) { prob_no_further_node = 1.0 / n; }
110
111 friend std::ostream& operator<<(std::ostream& os, const RandomClusterConfig& config);
112};
113
115
131
133
152 int node_per_cluster, int edges_per_cluster);
153
155OGDF_EXPORT void randomSyncPlanInstance(sync_plan::SyncPlan& pq, int pipe_count, int min_deg = 3);
156
158
169 int edges1, int edges2);
170
172
181 double frac_shared = 0.34, double frac_g1 = 0.33);
182
185
186}
Includes declaration of graph class.
Basic declarations, included by all source files.
Representation of clustered graphs.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Class for the representation of nodes.
Definition Graph_d.h:241
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
A class for modelling and solving Synchronized Planarity instances.
Definition SyncPlan.h:124
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
void randomClustering(ClusterGraph &C, int cNum)
Creates a random clustering for a given graph G.
void randomSEFEInstanceByUnionGraph(const Graph *sefe, EdgeArray< uint8_t > &edge_types, double frac_shared=0.34, double frac_g1=0.33)
Create a (simultaneously planar) 2-SEFE instance with a given union graph.
bool randomPlanarClustering(ClusterGraph &CG, const RandomClusterConfig &config)
Creates a random c-planar clustering for a given planar graph G.
void randomSEFEInstanceBySharedGraph(Graph *sefe, EdgeArray< uint8_t > &edge_types, int edges1, int edges2)
Create a (simultaneously planar) 2-SEFE instance with a given shared graph.
void randomClusterPlanarGraph(Graph &G, ClusterGraph &CG, int clusters, int node_per_cluster, int edges_per_cluster)
Create a random planar graph with a c-planar clustering.
void randomCConnectedClustering(ClusterGraph &C, int cNum)
Creates a random c-connected clustering for a given graph G.
void randomSyncPlanInstance(sync_plan::SyncPlan &pq, int pipe_count, int min_deg=3)
Create a random SynchronizedPlanarity instance by introducing pipe_count pipes between vertices of de...
The namespace for all OGDF objects.
Parameters for the randomPlanarClustering() method.
Definition clustering.h:89
double expected_nodes() const
Get the expected number of nodes per cluster, i.e., 1.0 / prob_no_further_node.
Definition clustering.h:106
void expected_nodes(double n)
Set the expected number of nodes per cluster, i.e., prob_no_further_node = 1.0 / n.
Definition clustering.h:109
friend std::ostream & operator<<(std::ostream &os, const RandomClusterConfig &config)