Class DurationAdapter
java.lang.Object
rgu.transport.geospatial.osm.DurationAdapter
Adapts an instance of Graph<GeoLocation, RoadEdge> to Graph<GeoLocation, Duration>
to use with an instance of RoutingAlgorithm<Duration> or
ReachabilityAlgorithm<Duration>.
- Author:
- Lee A. Christie
-
Method Summary
Modifier and TypeMethodDescriptionstatic Graph<GeoLocation, Duration> adapt(Graph<GeoLocation, RoadEdge> graph) Adapts the specified graph using the speed defined by the road edges.static Graph<GeoLocation, Duration> adapt(Graph<GeoLocation, RoadEdge> graph, Speed speed) Adapts the specified graph using the specified fixed speed.
-
Method Details
-
adapt
Adapts the specified graph using the specified fixed speed.- Parameters:
graph- the graph to adapt, not nullspeed- the fixed speed, not null, > 0- Returns:
- an adapted graph
-
adapt
Adapts the specified graph using the speed defined by the road edges.- Parameters:
graph- the graph to adapt, not null- Returns:
- an adapted graph
-