net.sf.javagimmicks.graph.routing.RouteFinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gimmicks Show documentation
Show all versions of gimmicks Show documentation
Utility classes, APIs and tools for Java
package net.sf.javagimmicks.graph.routing;
import java.util.Map;
import net.sf.javagimmicks.graph.Edge;
import net.sf.javagimmicks.graph.Graph;
/**
* Represents objects that can find {@link Route}s between vertices of a
* {@link Graph}.
*
* @param
* the type of vertices of the {@link Route}s to find
* @param
* the type of {@link Edge}s of the {@link Route}s to find
*/
public interface RouteFinder>
{
/**
* Bulk-finds all {@link Route}s to all target vertices that can be reached
* from a given source vertex.
*
* @param source
* the source vertex to find {@link Route}s for
* @return a {@link Map} of all reachable target vertices and the respective
* {@link Route}s to them from the given source vertex
*/
Map> findRoutes(VertexType source);
/**
* Finds a {@link Route} between a given source and target vertex.
*
* @param source
* the source vertex to find {@link Route} for
* @param target
* the target vertex to find {@link Route} for
* @return the resulting {@link Route} or {@code null} if the given target
* vertex is not reachable from the given source vertex.
*/
Route findRoute(VertexType source, VertexType target);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy