edu.turtlekit2.kernel.environment
Class GridVariable

java.lang.Object
  extended by edu.turtlekit2.kernel.environment.GridVariable

public class GridVariable
extends Object

This class manages the environment pheromones.

Version:
0.8 - 8/2009
Author:
F. Michel, G. Beurier

Field Summary
protected  TurtleEnvironment env
           
 double[][] gridValues
           
 
Constructor Summary
GridVariable(TurtleEnvironment env)
          Creates a new instance of GridVariable
 
Method Summary
 void addValue(int x, int y, double v)
           
 void diffusion()
          Diffusion method
 void evaporation()
           
 double[][] getAllValues()
           
 double getValue(int x, int y)
           
 void setDefaultValue(double defaultValue)
          set the defaultValue everywhere for this varibale
 void setDiffuseCoef(double diffuseCoef)
           
 void setEvapCoef(double evapCoef)
           
 void setValue(int x, int y, double v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gridValues

public final double[][] gridValues

env

protected final TurtleEnvironment env
Constructor Detail

GridVariable

public GridVariable(TurtleEnvironment env)
Creates a new instance of GridVariable

Method Detail

setEvapCoef

public void setEvapCoef(double evapCoef)

setDiffuseCoef

public void setDiffuseCoef(double diffuseCoef)

setDefaultValue

public final void setDefaultValue(double defaultValue)
set the defaultValue everywhere for this varibale

Parameters:
defaultValue - the value to set

getValue

public double getValue(int x,
                       int y)

setValue

public void setValue(int x,
                     int y,
                     double v)

addValue

public void addValue(int x,
                     int y,
                     double v)

diffusion

public void diffusion()
Diffusion method


getAllValues

public double[][] getAllValues()

evaporation

public void evaporation()