Class GraphStatistics

java.lang.Object
org.insa.graphs.model.GraphStatistics

public class GraphStatistics
extends java.lang.Object

Utility class that stores some statistics of graphs that are not easy to access.

This class is used to provide constant (O(1)) access to information in graph that do not change, and that usually require linear complexity to compute.

  • Field Details

    • NO_MAXIMUM_SPEED

      public static final int NO_MAXIMUM_SPEED
      Special value used to indicate that the graph has no maximum speed limit (some roads are not limited).
      See Also:
      Constant Field Values
  • Constructor Details

    • GraphStatistics

      public GraphStatistics​(GraphStatistics.BoundingBox boundingBox, int nbRoadOneWay, int nbRoadTwoWays, int maximumSpeed, float maximumLength)
      Create a new GraphStatistics instance with the given value.
      Parameters:
      boundingBox - Bounding-box for the graph.
      nbRoadOneWay - Number of one-way roads in the graph.
      nbRoadTwoWays - Number of two-ways roads in the graph.
      maximumSpeed - Maximum speed of any road of the graph. You can use NO_MAXIMUM_SPEED to indicate that the graph has no maximum speed limit.
      maximumLength - Maximum length of any arc of the graph.
  • Method Details