E
- Implementation of AbstractEdge
in a directed Graph
.P
- Point
type of positions in the network.public class Dijkstra<E extends AbstractEdge<E>,P extends Point<E>> extends Object implements Router<E,P>
Constructor and Description |
---|
Dijkstra() |
Modifier and Type | Method and Description |
---|---|
List<E> |
route(P source,
P target,
Cost<E> cost)
Gets path, i.e.
|
List<E> |
route(P source,
P target,
Cost<E> cost,
Cost<E> bound,
Double max)
Gets path, i.e.
|
Map<P,List<E>> |
route(P source,
Set<P> targets,
Cost<E> cost)
Gets path, i.e.
|
Map<P,List<E>> |
route(P source,
Set<P> targets,
Cost<E> cost,
Cost<E> bound,
Double max)
Gets path, i.e.
|
Map<P,Tuple<P,List<E>>> |
route(Set<P> sources,
Set<P> targets,
Cost<E> cost)
Gets path, i.e.
|
Map<P,Tuple<P,List<E>>> |
route(Set<P> sources,
Set<P> targets,
Cost<E> cost,
Cost<E> bound,
Double max)
Gets path, i.e.
|
public List<E> route(P source, P target, Cost<E> cost)
Router
AbstractEdge
s, from source Point
to target
Point
with minimum cost according to Cost
function.route
in interface Router<E extends AbstractEdge<E>,P extends Point<E>>
source
- Source Point
in the graph.target
- Target Point
in the graph.cost
- Custom Cost
function.AbstractEdge
s, from source Point
to target
Point
with minimum cost according to Cost
function. If there is no
path from source to target, it returns null.public List<E> route(P source, P target, Cost<E> cost, Cost<E> bound, Double max)
Router
AbstractEdge
s, from source Point
to target
Point
with minimum cost according to Cost
function. Search depth of routing
can be bound by bounding Cost
function and a maximum bounding cost value.route
in interface Router<E extends AbstractEdge<E>,P extends Point<E>>
source
- Source Point
in the graph.target
- Target Point
in the graph.cost
- Custom Cost
function.bound
- Bounding Cost
function.max
- Maximum bounding cost value to bound search depth.AbstractEdge
s, from source Point
to target
Point
with minimum cost according to Cost
function. If there is no
path from source to target, it returns null.public Map<P,List<E>> route(P source, Set<P> targets, Cost<E> cost)
Router
AbstractEdge
s, from source Point
to each target
Point
with minimum cost according to Cost
function.route
in interface Router<E extends AbstractEdge<E>,P extends Point<E>>
source
- Source Point
in the graph.targets
- Set of target Point
s in the graph.cost
- Custom Cost
function.Point
to path, i.e. a sequence of AbstractEdge
s, from
source Point
to target Point
with minimum cost according to
Cost
function. If there is no path from source to target, it maps to null.public Map<P,List<E>> route(P source, Set<P> targets, Cost<E> cost, Cost<E> bound, Double max)
Router
AbstractEdge
s, from source Point
to each target
Point
with minimum cost according to Cost
function. Search depth of routing
can be bound by bounding Cost
function and a maximum bounding cost value.route
in interface Router<E extends AbstractEdge<E>,P extends Point<E>>
source
- Source Point
in the graph.targets
- Set of target Point
s in the graph.cost
- Custom Cost
function.bound
- Bounding Cost
function.max
- Maximum bounding cost value to bound search depth.Point
to path, i.e. a sequence of AbstractEdge
s, from
source Point
to target Point
with minimum cost according to
Cost
function. If there is no path from source to target, it maps to null.public Map<P,Tuple<P,List<E>>> route(Set<P> sources, Set<P> targets, Cost<E> cost)
Router
AbstractEdge
s, to each target Point
from
exactly that source Point
that has minimum cost according to Cost
function.route
in interface Router<E extends AbstractEdge<E>,P extends Point<E>>
sources
- Set of source Point
s in the graph.targets
- Set of target Point
s in the graph.cost
- Custom Cost
function.Point
to a tuple of path, i.e. a sequence of
AbstractEdge
s, and source Point
that have minimum cost according to
Cost
function for reaching the target. If there is no path to target, it maps
to null.public Map<P,Tuple<P,List<E>>> route(Set<P> sources, Set<P> targets, Cost<E> cost, Cost<E> bound, Double max)
Router
AbstractEdge
s, to each target Point
from
exactly that source Point
that has minimum cost according to Cost
function.
Search depth of routing can be bound by bounding Cost
function and a maximum bounding
cost value.route
in interface Router<E extends AbstractEdge<E>,P extends Point<E>>
sources
- Set of source Point
s in the graph.targets
- Set of target Point
s in the graph.cost
- Custom Cost
function.bound
- Bounding Cost
function.max
- Maximum bounding cost value to bound search depth.Point
to a tuple of path, i.e. a sequence of
AbstractEdge
s, and source Point
that have minimum cost according to
Cost
function for reaching the target. If there is no path to target, it maps
to null.Copyright © 2016. All rights reserved.