Class LogicalSubPathImpl

    • Constructor Detail

      • LogicalSubPathImpl

        public LogicalSubPathImpl​(LogicalPath referencePath,
                                  int startLinkIndex,
                                  double startPercentage,
                                  int endLinkIndex,
                                  double endPercentage,
                                  double[] costs,
                                  double[] costsOffRefPath,
                                  CategorizedUserData userData)
      • LogicalSubPathImpl

        public LogicalSubPathImpl​(LogicalPath referencePath,
                                  int startLinkIndex,
                                  double startPercentage,
                                  int endLinkIndex,
                                  double endPercentage,
                                  double[] costs,
                                  CategorizedUserData userData)
    • Method Detail

      • knowsIntermediateNodeCosts

        public boolean knowsIntermediateNodeCosts()
      • getCostsToNode

        public double[] getCostsToNode​(int nodeIndex)
        Description copied from interface: LogicalSubPath
        Returns the cumulative costs from the start point to the input node.
        Specified by:
        getCostsToNode in interface LogicalSubPath
        Returns:
      • reverse

        public void reverse()
        Description copied from interface: LogicalLightSubPath
        Reverses the sub-path, and flip the isReverse flag of the reference path. Similar to a path, a sub-path can be represented in the traveling direction, or in the reverse direction. When represented in reverse direction, the isReverse flag of its reference path is set to true.
        Specified by:
        reverse in interface LogicalLightSubPath
      • getCategorizedUserData

        public abstract CategorizedUserData getCategorizedUserData()
        Returns categorized user data.
        Returns:
      • setCategorizedUserData

        public abstract void setCategorizedUserData​(CategorizedUserData userData)
        Sets categorized user data.
        Parameters:
        userData -
      • getUserData

        public abstract UserData getUserData​(int category)
        Returns user data for the specified category.
        Returns:
      • setUserData

        public abstract void setUserData​(int category,
                                         UserData userData)
        Sets user data for the specified category.
        Parameters:
        userData -
      • clone

        public abstract java.lang.Object clone()
                                        throws java.lang.CloneNotSupportedException
        Support cloneable
        Returns:
        cloned object
        Throws:
        java.lang.CloneNotSupportedException
      • init

        protected void init​(LogicalLightPath referencePath,
                            int startLinkIndex,
                            double startPercentage,
                            int endLinkIndex,
                            double endPercentage,
                            double[] costs,
                            CategorizedUserData userData)
      • getStartPercentage

        public double getStartPercentage()
        Description copied from interface: LogicalLightSubPath
        Returns the location of the starting point of the subpath as a percentage of the first link of the containing path.
        Specified by:
        getStartPercentage in interface LogicalLightSubPath
        Returns:
        location of the starting point on the start link
      • getEndPercentage

        public double getEndPercentage()
        Description copied from interface: LogicalLightSubPath
        Returns the location of the end point of the subpath as a percentage of the last link of the containing path.
        Specified by:
        getEndPercentage in interface LogicalLightSubPath
        Returns:
        location of the end point on the end link
      • isFullPath

        public boolean isFullPath()
        Description copied from interface: LogicalLightSubPath
        Returns true if the subpath covers the entire reference path.
        Specified by:
        isFullPath in interface LogicalLightSubPath
        Returns:
        true if the subpath covers the entire reference path, false otherwise.
      • setStartPercentage

        public void setStartPercentage​(double startPercentage)
        Description copied from interface: LogicalLightSubPath
        Sets the location of the starting point of the subpath as a percentage of the first link of the containing path.
        Specified by:
        setStartPercentage in interface LogicalLightSubPath
      • setEndPercentage

        public void setEndPercentage​(double endPercentage)
        Description copied from interface: LogicalLightSubPath
        Sets the location of the end point of the subpath as a percentage of the last link of the containing path.
        Specified by:
        setEndPercentage in interface LogicalLightSubPath
      • compareTo

        public int compareTo​(java.lang.Object o)
        Specified by:
        compareTo in interface java.lang.Comparable
      • getUserData

        public UserData getUserData​(int category)
      • setUserData

        public void setUserData​(int category,
                                UserData userData)
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Support cloneable
        Overrides:
        clone in class java.lang.Object
        Returns:
        cloned object
        Throws:
        java.lang.CloneNotSupportedException