Class HighwayMatrix

    • Constructor Detail

      • HighwayMatrix

        public HighwayMatrix​(List<Highway> highways)
    • Method Detail

      • addHighway

        public int addHighway​(Highway highway)
        Description copied from class: AbstractHighwayMatrix
        Creates new HighwayPtr using specified highway and adds it to the end of highway pointers list.
        Specified by:
        addHighway in interface IHighwayMatrix
        Overrides:
        addHighway in class AbstractHighwayMatrix
        Parameters:
        highway - - the highway to be added to this matrix
        Returns:
        the index of the highway to be added
      • getPath

        public RoutePath getPath​(int indexFrom,
                                 org.eclipse.draw2d.geometry.Point start,
                                 int indexTo,
                                 org.eclipse.draw2d.geometry.Point end)
        Description copied from interface: IHighwayMatrix
        Finds the path
        Specified by:
        getPath in interface IHighwayMatrix
        Parameters:
        indexFrom - the identifier of the starting highway
        start - the start point
        indexTo - the identifier of the ending highway
        end - the end point and required direction from from this point
        Returns:
        finded path
        See Also:
        RoutePath
      • addToMatrix

        protected void addToMatrix​(HighwayMatrix.Cell[][] result,
                                   int newIndex)
      • updateMatrix

        protected void updateMatrix​(HighwayMatrix.Cell[][] result,
                                    int dest,
                                    int src)