public interface GraphDataProvider<T>
| Modifier and Type | Method and Description |
|---|---|
double |
getDistance(T from,
T to)
Provides the distance between two vertices.
|
default double |
getHeuristicDistance(T from,
T to)
Provides a heuristic distance between two vertices.
|
java.lang.Iterable<T> |
getNeighbours(T vertex)
Looks up and provides the vertices directly reachable from the given
vertex.
|
default GraphDataProvider<T> |
withDistance(Function2<T,T,java.lang.Double> distance)
Replaces the distance function with a custom function.
|
default GraphDataProvider<T> |
withHeuristic(Function2<T,T,java.lang.Double> heuristic)
Replaces the distance heuristic with a custom function.
|
java.lang.Iterable<T> getNeighbours(T vertex)
double getDistance(T from, T to)
from - to - default double getHeuristicDistance(T from, T to)
getDistance(Object, Object).default GraphDataProvider<T> withHeuristic(Function2<T,T,java.lang.Double> heuristic)
default GraphDataProvider<T> withDistance(Function2<T,T,java.lang.Double> distance)
Copyright © 2018. All Rights Reserved.