uchicago.src.repastdemos.heatBugs
Class HeatSpace

java.lang.Object
  extended by uchicago.src.sim.space.Diffuse2D
      extended by uchicago.src.repastdemos.heatBugs.HeatSpace
All Implemented Interfaces:
Discrete2DSpace, Torus

public class HeatSpace
extends Diffuse2D

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

Version:
$Revision: 1.1 $ $Date: 2005/08/12 20:04:54 $
Author:
Swarm Project and Nick Collier

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
HeatSpace(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.Diffuse2D
compareMax, compareMin, diffuse, findMaximum, findMinimum, getMatrix, getMooreNeighbors, getMooreNeighbors, getObjectAt, getSize, getSizeX, getSizeY, getValueAt, getVonNeumannNeighbors, getVonNeumannNeighbors, 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

HeatSpace

public HeatSpace(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