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

Class NodeMap



  • public class NodeMap
    extends java.lang.Object
    Represents all nodes associates a map.
    • Field Detail

      • nodes

        public ANode[][] nodes
    • Constructor Detail

      • NodeMap

        public NodeMap(int width,
                       int height,
                       double initialCost)
        Initializes a new instance of the NodeMap class.
        Parameters:
        width - Width.
        height - Height.
        initialCost - Initial cost to all nodes.
      • NodeMap

        public NodeMap(double[][] nodeCostMap)
        Initializes a new instance of the NodeMap class.
        Parameters:
        nodeCostMap - Cost map.
      • NodeMap

        public NodeMap(int width,
                       int height,
                       double initialCost,
                       AStar.Neighbor direction,
                       AStar.Heuristic heuristic)
        Initializes a new instance of the NodeMap class.
        Parameters:
        width - Width.
        height - Height.
        initialCost - Initial cost.
        direction - Direction.
        heuristic - Heuristic.
      • NodeMap

        public NodeMap(double[][] costMap,
                       AStar.Neighbor direction,
                       AStar.Heuristic heuristic)
        Initializes a new instance of the NodeMap class.
        Parameters:
        costMap - Cost map.
        direction - Direction.
        heuristic - Heuristic.
    • Method Detail

      • getWidth

        public int getWidth()
        Get width of Node Map.
        Returns:
        Width.
      • getHeight

        public int getHeight()
        Get height of Node Map.
        Returns:
        Height.
      • getNode

        public ANode getNode(int x,
                             int y)
        Get ANode from associate in this Node map.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
        Returns:
        ANode.
      • setNode

        public void setNode(int x,
                            int y,
                            ANode node)
        Set ANode.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
        node - ANode.
      • getDirection

        public AStar.Neighbor getDirection()
        Get direction.
        Returns:
        Direction.
      • setDirection

        public void setDirection(AStar.Neighbor direction)
        Set direction.
        Parameters:
        direction - Direction.
      • getHeuristic

        public AStar.Heuristic getHeuristic()
        Get heuristic.
        Returns:
        Heuristic.
      • setHeuristic

        public void setHeuristic(AStar.Heuristic heuristic)
        Set heuristic.
        Parameters:
        heuristic - Heuristic.
      • getSurroundingNodes

        public ANode[] getSurroundingNodes(int x,
                                           int y)
        Get the neighbour nodes from the specified point.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
        Returns:
        Surrounding nodes.
      • ComputeHeuristic

        public double ComputeHeuristic(int startX,
                                       int startY,
                                       int endX,
                                       int endY)
        Compute the heuristic.
        Parameters:
        startX - X axis coordinate.
        startY - Y axis coordinate.
        endX - X axis coordinate.
        endY - Y axis coordinate.
        Returns:
        Value.
      • clone

        public NodeMap clone()
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.