GraphLab Project

graphlab.plugins.graphgenerator.generators
Class GeneralizedPetersonGenerator

java.lang.Object
  extended by graphlab.plugins.graphgenerator.generators.GeneralizedPetersonGenerator
All Implemented Interfaces:
BasicExtension, Extension, Parametrizable, GraphGeneratorExtension, GraphGeneratorInterface, SimpleGeneratorInterface

public class GeneralizedPetersonGenerator
extends java.lang.Object
implements GraphGeneratorExtension, Parametrizable, SimpleGeneratorInterface

Author:
Mohammad Ali Rostami

Field Summary
static java.lang.Integer k
           
static java.lang.Integer n
           
 
Constructor Summary
GeneralizedPetersonGenerator()
           
 
Method Summary
 java.lang.String checkParameters()
          checks the parameters and return an error string if the parameter values are invalid, otherwise it returns null, also if some other fields should be set after setting the parameters you can do it in this method
static GraphModel generateGeneralizedPeterson(int n, int k)
          generates a Generalized Peterson Graph with given parameters
 GraphModel generateGraph()
           
 java.lang.String getDescription()
           
 EdgeModel[] getEdges()
           
 java.lang.String getName()
           
 java.awt.Point[] getVertexPositions()
           
 VertexModel[] getVertices()
           
 void setWorkingGraph(GraphModel g)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n

public static java.lang.Integer n

k

public static java.lang.Integer k
Constructor Detail

GeneralizedPetersonGenerator

public GeneralizedPetersonGenerator()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Extension

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Extension

setWorkingGraph

public void setWorkingGraph(GraphModel g)
Specified by:
setWorkingGraph in interface SimpleGeneratorInterface

getVertices

public VertexModel[] getVertices()
Specified by:
getVertices in interface SimpleGeneratorInterface

getEdges

public EdgeModel[] getEdges()
Specified by:
getEdges in interface SimpleGeneratorInterface

getVertexPositions

public java.awt.Point[] getVertexPositions()
Specified by:
getVertexPositions in interface SimpleGeneratorInterface

checkParameters

public java.lang.String checkParameters()
Description copied from interface: Parametrizable
checks the parameters and return an error string if the parameter values are invalid, otherwise it returns null, also if some other fields should be set after setting the parameters you can do it in this method

Specified by:
checkParameters in interface Parametrizable

generateGraph

public GraphModel generateGraph()
Specified by:
generateGraph in interface GraphGeneratorInterface

generateGeneralizedPeterson

public static GraphModel generateGeneralizedPeterson(int n,
                                                     int k)
generates a Generalized Peterson Graph with given parameters


GraphLab Project