uchicago.src.repastdemos.hexabugs
Class HexaSpace

java.lang.Object
  extended by uchicago.src.sim.space.Diffuse2D
      extended by uchicago.src.sim.space.Diffuse2DHexagonal
          extended by uchicago.src.repastdemos.hexabugs.HexaSpace
All Implemented Interfaces:
Discrete2DSpace, Torus

public class HexaSpace
extends Diffuse2DHexagonal

The environment that the heat bugs inhabit. This uses a Diffuse2DHexagonal to diffuse the heat absorbed from the bugs.

Version:
$Revision: 1.1 $ $Date: 2005/08/12 20:04:58 $

Field Summary
static int COLD
           
static int HOT
           
 
Fields inherited from class uchicago.src.sim.space.Diffuse2D
diffCon, evapRate, MAX, MIN, nextX, nextY, prevX, prevY, readMatrix, writeMatrix, x, xSize, y, ySize
 
Fields inherited from interface uchicago.src.sim.space.Discrete2DSpace
MOORE, VON_NEUMANN
 
Constructor Summary
HexaSpace(double diffusionConstant, double evaporationRate, int xSize, int ySize)
           
 
Method Summary
 void addHeat(int x, int y, int heat)
           
 java.awt.Point findExtreme(int type, int x, int y)
          Find the extreme hot or cold within this 9 cell neighborhood
 
Methods inherited from class uchicago.src.sim.space.Diffuse2DHexagonal
diffuse, findMaximum, findMinimum, getMooreNeighbors, getMooreNeighbors, getNeighbors, getNeighbors, getVonNeumannNeighbors, getVonNeumannNeighbors
 
Methods inherited from class uchicago.src.sim.space.Diffuse2D
compareMax, compareMin, findMaximum, findMinimum, getMatrix, getObjectAt, getSize, getSizeX, getSizeY, getValueAt, putObjectAt, putValueAt, setDiffusionConstant, setEvaporationRate, update, xnorm, ynorm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOT

public static final int HOT
See Also:
Constant Field Values

COLD

public static final int COLD
See Also:
Constant Field Values
Constructor Detail

HexaSpace

public HexaSpace(double diffusionConstant,
                 double evaporationRate,
                 int xSize,
                 int ySize)
Method Detail

addHeat

public void addHeat(int x,
                    int y,
                    int heat)

findExtreme

public java.awt.Point findExtreme(int type,
                                  int x,
                                  int y)
Find the extreme hot or cold within this 9 cell neighborhood

Returns:
the extreme point