Class VisitedNode

  • All Implemented Interfaces:
    java.lang.Comparable, Identifiable
    Direct Known Subclasses:
    AStar.AStarVisitedNode

    public abstract class VisitedNode
    extends java.lang.Object
    implements Identifiable, java.lang.Comparable
    This class represents a node visited while exploring a network.
    Since:
    release specific (what release of product did this appear in)
    • Constructor Summary

      Constructors 
      Constructor Description
      VisitedNode()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object o)  
      boolean equals​(java.lang.Object o)  
      abstract double[] getCosts()
      Return the costs from the start points to the node.
      abstract double[] getCostsAtPrevNode()
      Returns the costs to pass through the previous node.
      int getDepth()
      Returns the depth of the current node, which is equal to the number of links from the start node to the current node.
      long getId()
      Returns the ID of the node.
      int getLinkLevel()
      Returns the link level the node is to be expanded on.
      int getPartitionId()
      Returns the ID of the partition that the node is assigned to.
      long getPrevLink()
      Returns the ID of the previous link.
      VisitedNode getPrevNode()
      Returns the previous node.
      java.lang.Object getUserObject()
      Returns the user object associated to this node.
      int hashCode()  
      protected void init​(long id, int depth, int linkLevel, int partitionId)  
      protected void init​(long id, long prevLink, VisitedNode prevNode, int depth, int linkLevel, int partitionId, java.lang.Object userObject)  
      • Methods inherited from class java.lang.Object

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

      • VisitedNode

        public VisitedNode()
    • Method Detail

      • init

        protected void init​(long id,
                            int depth,
                            int linkLevel,
                            int partitionId)
      • init

        protected void init​(long id,
                            long prevLink,
                            VisitedNode prevNode,
                            int depth,
                            int linkLevel,
                            int partitionId,
                            java.lang.Object userObject)
      • compareTo

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

        public long getId()
        Returns the ID of the node.
        Specified by:
        getId in interface Identifiable
        Returns:
      • getPartitionId

        public int getPartitionId()
        Returns the ID of the partition that the node is assigned to.
        Returns:
      • getCosts

        public abstract double[] getCosts()
        Return the costs from the start points to the node.
        Returns:
      • getCostsAtPrevNode

        public abstract double[] getCostsAtPrevNode()
        Returns the costs to pass through the previous node.
        Returns:
      • getPrevLink

        public long getPrevLink()
        Returns the ID of the previous link.
        Returns:
      • getPrevNode

        public VisitedNode getPrevNode()
        Returns the previous node.
        Returns:
      • getDepth

        public int getDepth()
        Returns the depth of the current node, which is equal to the number of links from the start node to the current node. The depth of the start node is 0.
        Returns:
      • getLinkLevel

        public int getLinkLevel()
        Returns the link level the node is to be expanded on.
        Returns:
      • getUserObject

        public java.lang.Object getUserObject()
        Returns the user object associated to this node.
        Returns:
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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