AIILE.gridworld.env
Class Grid2D

java.lang.Object
  extended byAIILE.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.


Field Summary
protected  GridNode currentNode
           
protected  GridNode goalNode
           
protected  org._3pq.jgrapht.DirectedGraph grid
           
protected  java.util.Vector gridMap
           
protected  java.awt.Dimension gridSize
           
protected  GridNode prevCurNode
           
protected  GridNode startNode
           
protected  EnvironmentUserOptions userOptions
           
 
Constructor Summary
Grid2D()
          Creates a new instance of Grid2D
Grid2D(org._3pq.jgrapht.DirectedGraph g, EnvironmentUserOptions uOptions)
           
Grid2D(EnvironmentUserOptions uOptions)
           
Grid2D(java.util.HashSet vSet, java.util.HashSet eSet)
           
 
Method Summary
 Grid2D copy()
          Does not work!!
 void display()
           
 GridNode getCurrentNode()
           
 java.util.HashSet getEdgeSet()
           
 EnvironmentUserOptions getEnvUserOptions()
           
 GridNode getGoalNode()
           
 org._3pq.jgrapht.DirectedGraph getGrid()
           
 java.awt.Dimension getGridSize()
           
 GridNode getPrevCurNode()
           
 GridNode getStartNode()
           
 java.util.Vector getSuccessorNode(GridNode pNode)
           
 java.util.HashSet getVertexSet()
           
 void setCurrentNode(GridNode current)
           
 void setEnvUserOptions(EnvironmentUserOptions uOptions)
           
 void setGoalNode(GridNode goal)
           
 void setGridSize(java.awt.Dimension gSize)
           
 void setPrevCurNode(GridNode prev)
           
 void setStartNode(GridNode start)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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)
Method Detail

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!!