Documentation of 'Catalano.Graph.Pathfinding.AStar.ANode' Java class
ANode
Catalano.Graph.Pathfinding.AStar

Class ANode

  • All Implemented Interfaces:
    java.lang.Comparable<ANode>


    public class ANode
    extends java.lang.Object
    implements java.lang.Comparable<ANode>
    Represents a Node for the A* algorithm.
    • Constructor Detail

      • ANode

        public ANode(int x,
                     int y,
                     double cost,
                     NodeMap mapParent)
        Initializes a new instance of the ANode class.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
        cost - Cost.
        mapParent - NodeMap.
    • Method Detail

      • getX

        public int getX()
        Get X axis coordinate.
        Returns:
        X axis coordinate.
      • setX

        public void setX(int x)
        Set X axis coordinate.
        Parameters:
        x - X axis coordinate.
      • getY

        public int getY()
        Set Y axis coordinate.
        Returns:
        Y axis coordinate.
      • setY

        public void setY(int y)
        Set Y axis coordinate.
        Parameters:
        y - Y axis coordinate.
      • getCost

        public double getCost()
        Get cost.
        Returns:
        Cost.
      • setCost

        public void setCost(double cost)
        Set cost.
        Parameters:
        cost - Cost.
      • getH

        public double getH()
        Get H value.
        Returns:
        H Value.
      • setH

        public void setH(double h)
        Set H value.
        Parameters:
        h - H value.
      • getG

        public double getG()
        Get G value.
        Returns:
        G value.
      • setG

        public void setG(double g)
        Set G value.
        Parameters:
        g - G value.
      • getF

        public double getF()
        Get F value.
        Returns:
        F value.
      • isOnOpenList

        public boolean isOnOpenList()
        Check if is on open list.
        Returns:
        True if is on open list, otherwise false.
      • setOnOpenList

        public void setOnOpenList(boolean onOpenList)
        Set if this node is on open list.
        Parameters:
        onOpenList - True if this node is on open list.
      • isOnClosedList

        public boolean isOnClosedList()
        Check if is on closed list.
        Returns:
        True if is on closed list, otherwise false.
      • setOnClosedList

        public void setOnClosedList(boolean onClosedList)
        Set if this node is on closed list.
        Parameters:
        onClosedList - True if this node is on closed list.
      • getParent

        public ANode getParent()
        Get parent.
        Returns:
        Parent.
      • setParent

        public void setParent(ANode node)
        Set parent.
        Parameters:
        node - Parent.
      • getMapParent

        public NodeMap getMapParent()
        Get Node map.
        Returns:
        Node map.
      • setMapParent

        public void setMapParent(NodeMap nodeMap)
        Set Node map.
        Parameters:
        nodeMap - Node map.
      • getSurroundingNodes

        public ANode[] getSurroundingNodes()
        Get Surrouding nodes.
        Returns:
        Surrouding nodes.
      • ComputeHeuristic

        public double ComputeHeuristic(ANode Target)
        Compute heuristic in the specified ANode.
        Parameters:
        Target - ANode.
        Returns:
        Heuristic.
      • ComputeHeuristic

        public double ComputeHeuristic(int x,
                                       int y)
        Compute heuristic in the specified ANode.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
        Returns:
        Heuristic.
      • clone

        public ANode clone(NodeMap parent)
        Clone this ANode.
        Parameters:
        parent - Parent.
        Returns:
        ANode.
      • compareTo

        public int compareTo(ANode o)
        Specified by:
        compareTo in interface java.lang.Comparable<ANode>

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.