All Downloads are FREE. Search and download functionalities are using the official Maven repository.

salvo.jesus.graph.Path Maven / Gradle / Ivy

Go to download

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;

/**
 * An interface that abstracts a path in a graph. In this context,
 * a path is a consecutive sequence of vertices from one vertex
 * to another connected by edges.
 * 

* The important word here is consecutive. Thus, implementations * are required to make sure that if an Edge is added to a * Path, that the Edge being added is between * the last Vertex in the path to a new Vertex. * If a Vertex is being added, that am Edge is * created between the last Vertex in the Path to * the new Vertex being added. *

* If an acyclic path is required, then implement the AcyclicPath * interface instead. * * @author Jesus M. Salvo Jr. */ public interface Path extends Graph { /** * Returns the first Vertex in the Path. */ public Vertex getFirstVertex(); /** * Returns the last Vertex in the Path. */ public Vertex getLastVertex(); /** * Removes the last Vertex that was added in the Path. */ public void remove() throws Exception; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy