Interface LogicalPath

  • All Superinterfaces:
    LogicalLightPath
    All Known Subinterfaces:
    SpatialPath

    public interface LogicalPath
    extends LogicalLightPath
    A LogicalPath is defined by an array of link IDs, array of node IDs, and the costs for traversing through this path. The cost of a path is the sum of the costs of the the links and nodes on the path, excluding that of the end node. The costs of the links and nodes are defined by LinkCostCalculator and NodeCostCalculator.
    Since:
    11gR1
    • Method Detail

      • getLinkIds

        long[] getLinkIds()
        Returns the array of link IDs on this path.
        Returns:
        array of link IDs
      • getNodeIds

        long[] getNodeIds()
        Returns the array of node IDs on this path.
        Returns:
        array of node IDs
      • isSimple

        boolean isSimple()
        Checks whether this path is simple or not. A path is simple if no node is visited twice on this path, i.e., no loop exists on this path.
        Returns:
        true, if the path is simple; false, otherwise.
      • append

        LogicalPath append​(long nextLinkId,
                           double nextLinkCost,
                           long nextNodeId,
                           double connectorNodeCosts)
                    throws LODNetworkException
        Deprecated.
        use append(long nextLinkId, double[] nextLinkCosts, long nextNodeId, double[] connectorNodeCosts);
        Append a link to this path.
        Parameters:
        nextLinkId - ID of the next link
        nextLinkCost - cost of the next link
        nextNodeId - ID of the next node
        connectorNodeCosts - cost of the connector node
        Throws:
        LODNetworkException
      • append

        LogicalPath append​(long nextLinkId,
                           double[] nextLinkCosts,
                           long nextNodeId,
                           double[] connectorNodeCosts)
                    throws LODNetworkException
        Append a link to this path.
        Parameters:
        nextLinkId - ID of the next link
        nextLinkCosts - costs of the next link
        nextNodeId - ID of the next node
        connectorNodeCosts - costs of the connector node
        Throws:
        LODNetworkException
      • prepend

        LogicalPath prepend​(long prevLinkId,
                            double prevLinkCost,
                            long prevNodeId,
                            double prevNodeCost)
                     throws LODNetworkException
        Deprecated.
        use prepend(long prevLinkId, double[] prevLinkCosts, long prevNodeId, double[] connectorNodeCosts);
        Prepend a link to this path.
        Parameters:
        prevLinkId - ID of the previous link
        prevLinkCost - cost of the previous link
        prevNodeId - ID of the previous node
        prevNodeCost - costs of the node to be prepended
        Throws:
        LODNetworkException
      • prepend

        LogicalPath prepend​(long prevLinkId,
                            double[] prevLinkCosts,
                            long prevNodeId,
                            double[] prevNodeCosts)
                     throws LODNetworkException
        Prepend a link to this path.
        Parameters:
        prevLinkId - ID of the previous link
        prevLinkCosts - costs of the previous link
        prevNodeId - ID of the previous node
        prevNodeCosts - costs of the node to be prepended
        Throws:
        LODNetworkException
      • append

        LogicalPath append​(LogicalPath path,
                           double connectorNodeCost)
                    throws LODNetworkException
        Deprecated.
        use append(LogicalPath path);
        Appends a path to the end this path.
        Parameters:
        path - path to append to the end
        connectorNodeCost - cost of the connector node
        Returns:
        Throws:
        LODNetworkException
      • prepend

        LogicalPath prepend​(LogicalPath path,
                            double connectorNodeCost)
                     throws LODNetworkException
        Deprecated.
        use prepend(LogicalPath path);
        Appends a path to the beginning of this path.
        Parameters:
        path - path to append at the beginning
        connectorNodeCost - cost of the connector node
        Returns:
        Throws:
        LODNetworkException
      • indexOfNode

        int indexOfNode​(long nodeId)
        Returns the index of the specified node in this path.
        Parameters:
        nodeId - node id
        Returns:
        the index of the node, if the path contains the node; -1, otherwise.
      • indexOfLink

        int indexOfLink​(long linkId)
        Returns the index of the specified link in this path.
        Parameters:
        linkId - link id
        Returns:
        the index of the link, if the path contains the link; -1, otherwise.
      • getCostsToNode

        double[] getCostsToNode​(int nodeIndex)
        Returns the cumulative costs from the start node to the input node.
        Parameters:
        nodeIndex - index of node in the reference path
        Returns:
      • getCostsAtNode

        double[] getCostsAtNode​(int nodeIndex)
        Returns the costs to pass through the input node.
        Parameters:
        nodeIndex -
        Returns:
      • getCostsToNodes

        double[][] getCostsToNodes()
        Returns an array of cumulative costs from the start node to the nodes on the path.
        Returns:
      • getCostsAtNodes

        double[][] getCostsAtNodes()
        Returns an array of costs at each individual nodes on the path.
        Returns:
      • getCategorizedUserData

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

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

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

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

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