Class MaxDepthConstraint

    • Constructor Summary

      Constructors 
      Constructor Description
      MaxDepthConstraint​(int maxDepth)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getNumberOfUserObjects()
      Returns the max number of user objects to be returned by the getCurrentUserObjects method in LODAnalysisInfo.
      int[] getUserDataCategories()
      Returns the required user data categories.
      boolean isCurrentNodePartiallyExpanded​(LODAnalysisInfo info)
      While expanding a node during network search, the search algorithm may not be able to access all the outgoing links due to network constraint, and we call a node with unaccessible outgoing links partially expanded node.
      boolean isSatisfied​(LODAnalysisInfo info)
      Checks if the constraint is satisfied.
      void reset()
      This method allows a stateful network constraint object to be reset to its original state and reused by network analysis functions.
      void setNetworkAnalyst​(NetworkAnalyst analyst)
      This method allows caller to pass the network analyst object to this constraint, so that the constraint can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MaxDepthConstraint

        public MaxDepthConstraint​(int maxDepth)
    • Method Detail

      • getNumberOfUserObjects

        public int getNumberOfUserObjects()
        Description copied from interface: LODNetworkConstraint
        Returns the max number of user objects to be returned by the getCurrentUserObjects method in LODAnalysisInfo.
        Specified by:
        getNumberOfUserObjects in interface LODNetworkConstraint
        Returns:
      • isCurrentNodePartiallyExpanded

        public boolean isCurrentNodePartiallyExpanded​(LODAnalysisInfo info)
        Description copied from interface: LODNetworkConstraint
        While expanding a node during network search, the search algorithm may not be able to access all the outgoing links due to network constraint, and we call a node with unaccessible outgoing links partially expanded node. However, if the node can be revisited and expanded again later, say from a different incoming link, then the unaccessible outgoing links might become accessible, making the node fully expanded. In this case, this method should return true if the current node is partially expanded at this point of the search, and false when the current node is fully expanded.
        A node should be considered partially expanded if you plan to revisit it after it is expanded, even if all the outgoing links from the node has been accessed.
        The contraint implementation class needs to maintain a partially expanded node list, which contains all the nodes that can be revisited later during the search and the corresponding outgoing link status associated with these nodes. Each time the node is revisited, the status of its outgoing links needs to be updated. A node should be removed from the partially expanded list when it no longer needs to be revisited.
        Specified by:
        isCurrentNodePartiallyExpanded in interface LODNetworkConstraint
        Returns:
      • reset

        public void reset()
        Description copied from interface: LODNetworkConstraint
        This method allows a stateful network constraint object to be reset to its original state and reused by network analysis functions.
        Specified by:
        reset in interface LODNetworkConstraint
      • setNetworkAnalyst

        public void setNetworkAnalyst​(NetworkAnalyst analyst)
        Description copied from interface: LODNetworkConstraint
        This method allows caller to pass the network analyst object to this constraint, so that the constraint can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst. If network analyst is not needed by the constraint, the link level selector can choose to do nothing with this method.
        Specified by:
        setNetworkAnalyst in interface LODNetworkConstraint