java.lang.Object
org.jgrapht.generate.GeneralizedPetersenGraphGenerator<V,E> 
- Type Parameters:
 V- graph vertex typeE- graph edge type
- All Implemented Interfaces:
 GraphGenerator<V,E, List<V>> 
public class GeneralizedPetersenGraphGenerator<V,E> 
extends Object
implements GraphGenerator<V,E,List<V>>  
Generator for Generalized
 Petersen Graphs The Generalized Petersen graphs $GP(n,k)$ are a family of cubic graphs formed
 by connecting the vertices of a regular polygon (cycle graph $C_n$) to the corresponding vertices
 of a star polygon ${n,k}$. Several special cases of the generalized Petersen graph are predefined
 in the 
NamedGraphGenerator.- Author:
 - Joris Kinable
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionGeneralizedPetersenGraphGenerator(int n, int k) 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, waitMethods inherited from interface org.jgrapht.generate.GraphGenerator
generateGraph 
- 
Field Details
- 
STAR
Key used to access the star polygon vertices in the resultMap- See Also:
 
 - 
REGULAR
Key used to access the regular polygon vertices in the resultMap- See Also:
 
 
 - 
 - 
Constructor Details
- 
GeneralizedPetersenGraphGenerator
public GeneralizedPetersenGraphGenerator(int n, int k) Constructs a GeneralizedPetersenGraphGenerator used to generate a Generalized Petersen graphs $GP(n,k)$.- Parameters:
 n- size of the regular polygon (cycle graph $C_n$)k- size of the star polygon ${n,k}$
 
 - 
 - 
Method Details
- 
generateGraph
Generates the Generalized Petersen Graph- Specified by:
 generateGraphin interfaceGraphGenerator<V,E, List<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, the resultMap contains a mapping from the key "star" to a list of vertices constituting the star polygon, as well as a key "regular" which maps to a list of vertices constituting the regular polygon.
 
 -