package dijkstra;
import java.util.ArrayList;
/**
* The PreviousInterface contains information about the father (as in the graph's theory) of some VertexInterface.
* The father of a VertexInterface is the VertexInterface used to reach it.
* Typically in Dijkstra, it's the VertexInterface used to reach vertex with the lowest cost.
*/
public interface PreviousInterface {
/**
* Returns the father of a VertexInterface.
* @param vertex
* The VertexInterface from which we get the father (previous VertexInterface).
* @return The direct previous element used to reach vertex.
*/
public VertexInterface getPrevious(VertexInterface vertex) ;
/**
* Sets the father of an element to another element.
* @param father
* The element that will become the father of the other element.
* @param son
* The element that will be assigned a new father.
*/
public void setPrevious(VertexInterface father, VertexInterface son) ;
/**
* Shortest path from root to a vertex.
* @param vertex
* The vertex to which the shortest path will be computed.
* @return An ArrayList of the VertexInterface used to reach vertex with the lowest cost.
*/
public ArrayList getShortestPathTo(VertexInterface vertex) ;
}