Package org.jgrapht.alg.shortestpath
Interface PathValidator<V,E>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
public interface PathValidator<V,E>May be used to provide external path validations in addition to the basic validations done byKShortestPaths- that the path is from source to target and that it does not contain loops.- Since:
- July, 21, 2016
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisValidPath(AbstractPathElement<V,E> prevPathElement, E edge)Checks if an edge can be added to a previous path element.
-
-
-
Method Detail
-
isValidPath
boolean isValidPath(AbstractPathElement<V,E> prevPathElement, E edge)
Checks if an edge can be added to a previous path element.- Parameters:
prevPathElement- the previous path elementedge- the edge to be added to the path.- Returns:
trueif edge can be added,falseotherwise.
-
-