org.grinvin.factories.graphs
Class AbstractGraphFactory
- Factory, GraphFactory, NamedFactory
public abstract class AbstractGraphFactory
Common superclass of various graph factory classes. Provides support for
internationalization and some helper methods.
AbstractGraphFactory
public AbstractGraphFactory()
Default constructor.
createCycle
protected static Vertex[] createCycle(Graph graph,
Embedding embedding,
int nr) Create a graph and embedding with vertices spaced
equally along the circumference of the unit circle.
graph - graph to which the given vertices will be assignedembedding - embedding which will hold the coordinatesnr - number of vertices to create
- The array of vertices created
createPath
protected static Vertex[] createPath(Graph graph,
Embedding embedding,
int length) Create a graph amd embedding with vertices spaced equally along the
interval -1..1.
graph - graph to which the given vertices will be assignedembedding - embedding which will hold the coordinateslength - number of vertices to create
- The array of vertices created
getId
public String getId()
The id of a graph factory is usually the same as its fully qualified class name.
For reasons of backwards compatibility however, ids of a class in one of the subpackages
org.grinvin.factories.graphs.chemical or
org.grinvin.factories.graphs.standard are given an idea as if they resided
in the package org.grinvin.factories.
- getId in interface GraphFactory
- getId in interface AbstractNamedFactory
initProperties
protected void initProperties(InternationalizedProperties iprops)
Initialize name and description for this graph from the resource bundle.
iprops - Properties object into which the results will be stored