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.


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)
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

update

public void update()

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