
salvo.jesus.graph.DirectedAcyclicGraphImplFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OpenJGraph Show documentation
Show all versions of OpenJGraph Show documentation
This is a modified version of the OpenJGraph library (https://sourceforge.net/projects/openjgraph/), used in the JInsect library.
The newest version!
package salvo.jesus.graph;
/**
* The factory for creating Vertices and Edges in a GraphImpl class.
*
* @author Jesus M. Salvo jr.
*/
public class DirectedAcyclicGraphImplFactory implements GraphFactory {
public DirectedAcyclicGraphImplFactory() {}
public Vertex createVertex() {
return new VertexImpl( "New Vertex" );
}
public Edge createEdge( Vertex v1, Vertex v2 ) {
return new DirectedEdgeImpl( v1, v2 );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy