AIILE.gridworld.env
Class Grid2D
java.lang.Object
AIILE.gridworld.env.Grid2D
- All Implemented Interfaces:
- Graph
- public class Grid2D
- extends java.lang.Object
- implements Graph
This class creates a graph from the .env file, the graph has the form
of a 2D grid, where the top left corner is the origin 0,0. This class
should not be messed with unless you know what you are doing.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gridMap
protected java.util.Vector gridMap
gridSize
protected java.awt.Dimension gridSize
grid
protected org._3pq.jgrapht.DirectedGraph grid
userOptions
protected EnvironmentUserOptions userOptions
startNode
protected GridNode startNode
goalNode
protected GridNode goalNode
currentNode
protected GridNode currentNode
prevCurNode
protected GridNode prevCurNode
Grid2D
public Grid2D()
- Creates a new instance of Grid2D
Grid2D
public Grid2D(org._3pq.jgrapht.DirectedGraph g,
EnvironmentUserOptions uOptions)
Grid2D
public Grid2D(EnvironmentUserOptions uOptions)
Grid2D
public Grid2D(java.util.HashSet vSet,
java.util.HashSet eSet)
getVertexSet
public java.util.HashSet getVertexSet()
getEdgeSet
public java.util.HashSet getEdgeSet()
display
public void display()
getStartNode
public GridNode getStartNode()
getGoalNode
public GridNode getGoalNode()
getEnvUserOptions
public EnvironmentUserOptions getEnvUserOptions()
setEnvUserOptions
public void setEnvUserOptions(EnvironmentUserOptions uOptions)
getGrid
public org._3pq.jgrapht.DirectedGraph getGrid()
setStartNode
public void setStartNode(GridNode start)
setGoalNode
public void setGoalNode(GridNode goal)
setCurrentNode
public void setCurrentNode(GridNode current)
getCurrentNode
public GridNode getCurrentNode()
setPrevCurNode
public void setPrevCurNode(GridNode prev)
getPrevCurNode
public GridNode getPrevCurNode()
setGridSize
public void setGridSize(java.awt.Dimension gSize)
getGridSize
public java.awt.Dimension getGridSize()
getSuccessorNode
public java.util.Vector getSuccessorNode(GridNode pNode)
copy
public Grid2D copy()
- Does not work!!