Class MRVMRegionsMap

  • All Implemented Interfaces:
    java.io.Serializable

    public class MRVMRegionsMap
    extends java.lang.Object
    implements java.io.Serializable
    Author:
    Michael Weiss
    See Also:
    Serialized Form
    • Method Detail

      • getLongestShortestPath

        public int getLongestShortestPath​(MRVMRegionsMap.Region region)
        Returns the length of the longest shortest path in the adjacency graph between the specified region and any other region.
      • getDistance

        public int getDistance​(MRVMRegionsMap.Region regionOne,
                               MRVMRegionsMap.Region regionTwo)
        Calculates the distance between two regions in this map.

        Distance is defined as the length of the shortest path in a graph representation of this map, where two regions share an edge if and only if they are adjacent. All edges have weight / lenght 1.
        If no path was found, getNumberOfRegions()-1 is returned.
      • getNumberOfRegions

        public int getNumberOfRegions()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object