java.lang.Object
org.jgrapht.generate.WindmillGraphsGenerator<V,E>
- Type Parameters:
V
- graph vertex typeE
- graph edge type
- All Implemented Interfaces:
GraphGenerator<V,
E, V>
Generator for Windmill Graphs,
Dutch Windmill Graphs and
Friendship Graphs.
The windmill graph $W_n^{(m)}$ is the graph obtained by taking $m$ copies of the complete graph $K_n$ with a vertex in common. The Dutch windmill graph $D_n^{(m)}$, is the graph obtained by taking $m$ copies of the cycle graph $C_3$ with a vertex in common. For the special case where $n=3$, $D_n^{(m)}$ and $W_n^{(m)}$ are identical. The class of graphs $D_3^{(m)}$ is sometimes referred to as the Friendship graph, denoted by $F_m$.
- Author:
- Joris Kinable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
WINDMILL and DUTCHWINDMILL Modes for the Constructor -
Constructor Summary
ConstructorDescriptionWindmillGraphsGenerator
(WindmillGraphsGenerator.Mode mode, int m, int n) Constructs a GeneralizedPetersenGraphGenerator used to generate a Generalized Petersen graphs $GP(n,k)$. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jgrapht.generate.GraphGenerator
generateGraph
-
Constructor Details
-
WindmillGraphsGenerator
Constructs a GeneralizedPetersenGraphGenerator used to generate a Generalized Petersen graphs $GP(n,k)$.- Parameters:
mode
- indicate whether the generator should generate Windmill graphs or Dutch Windmill graphsm
- number of copies of $C_n$ (Dutch Windmill graph) or $K_n$ (Windmill graph)n
- size of $C_n$ (Dutch Windmill graph) or $K_n$ (Windmill graph). To generate friendship graphs, set $n=3$ (the mode is irrelevant).
-
-
Method Details
-
generateGraph
Description copied from interface:GraphGenerator
Generate a graph structure. The topology of the generated graph is dependent on the implementation. For graphs in which not all vertices share the same automorphism equivalence class, the generator may produce a labeling indicating the roles played by generated elements. This is the purpose of the resultMap parameter. For example, a generator for a wheel graph would designate a hub vertex. Role names used as keys in resultMap should be declared as public static final Strings by implementation classes.- Specified by:
generateGraph
in interfaceGraphGenerator<V,
E, V> - Parameters:
target
- receives the generated edges and vertices; if this is non-empty on entry, the result will be a disconnected graph since generated elements will not be connected to existing elementsresultMap
- if non-null, receives implementation-specific mappings from String roles to graph elements (or collections of graph elements)
-