Class DurationAdapter

java.lang.Object
rgu.transport.geospatial.osm.DurationAdapter

public final class DurationAdapter extends Object
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 Details

    • adapt

      public static Graph<GeoLocation, Duration> adapt(Graph<GeoLocation, RoadEdge> graph, Speed speed)
      Adapts the specified graph using the specified fixed speed.
      Parameters:
      graph - the graph to adapt, not null
      speed - the fixed speed, not null, > 0
      Returns:
      an adapted graph
    • adapt

      public static Graph<GeoLocation, Duration> adapt(Graph<GeoLocation, RoadEdge> graph)
      Adapts the specified graph using the speed defined by the road edges.
      Parameters:
      graph - the graph to adapt, not null
      Returns:
      an adapted graph