edu.bonn.xulu.plugin.model.parallel
Class ClueTaskTuned

java.lang.Object
  extended by appl.parallel.spmd.AbstractSPMDTask
      extended by edu.bonn.xulu.plugin.model.parallel.ClueTaskTuned
All Implemented Interfaces:
SPMDTask, Serializable

public class ClueTaskTuned
extends AbstractSPMDTask

This is a tuned version of the ClueTask. Preloading and multithreading are used for a better resource utilization.

Author:
Dominik Appl
See Also:
Serialized Form

Field Summary
 
Fields inherited from class appl.parallel.spmd.AbstractSPMDTask
serverController
 
Constructor Summary
ClueTaskTuned()
           
 
Method Summary
 void calulateNeighborhoodProbabilities(Object... parameters)
           
protected  boolean checkLUCCAllowed(int x, int y, int stepNo, int lastLU, int newLU, boolean alreadyLUCCFromNewType)
          Prueft, ob ein bestimmter LU-Wechsel fuer eine Zelle erlaubt ist.
protected  boolean checkLUCCGeneralAllowed(int x, int y, int stepNo, int lastLU, boolean alreadyLUCCToActualType)
          Prueft, ob ein genereller LU-Wechsel fuer eine Zelle erlaubt ist.
protected static boolean checkNoData(int x, int y, WritableGrid grid)
          Prueft, ob eine Rasterzelle mit NoData belegt ist
 Object clue_iter(Object... parameters)
           
 void init()
          Use this method to implement if you want t
 Object run(Object... parameters)
          Starts the task with the given parameters.
 boolean supportsMultiThreading()
          returns false.
 
Methods inherited from class appl.parallel.spmd.AbstractSPMDTask
getAdvancedSPMDServerController, getSPMDServerController, incomingUpdate, initialize, isInitialized, outgoingUpdate, setSPMDServerController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClueTaskTuned

public ClueTaskTuned()
Method Detail

supportsMultiThreading

public boolean supportsMultiThreading()
Description copied from class: AbstractSPMDTask
returns false. Override this method to enable multithreading

Specified by:
supportsMultiThreading in interface SPMDTask
Overrides:
supportsMultiThreading in class AbstractSPMDTask
Returns:
whether multithreading can be used by this task
See Also:
SPMDTask.supportsMultiThreading()

init

public void init()
Description copied from class: AbstractSPMDTask
Use this method to implement if you want t

Specified by:
init in class AbstractSPMDTask

run

public Object run(Object... parameters)
Description copied from interface: SPMDTask
Starts the task with the given parameters. Overwrite this method to implement the task.

Specified by:
run in interface SPMDTask
Specified by:
run in class AbstractSPMDTask
Returns:
the result of the task computation (if any)

calulateNeighborhoodProbabilities

public void calulateNeighborhoodProbabilities(Object... parameters)

clue_iter

public Object clue_iter(Object... parameters)

checkLUCCGeneralAllowed

protected boolean checkLUCCGeneralAllowed(int x,
                                          int y,
                                          int stepNo,
                                          int lastLU,
                                          boolean alreadyLUCCToActualType)
Prueft, ob ein genereller LU-Wechsel fuer eine Zelle erlaubt ist.

Parameters:
x - Raster-Koordinate
y - Raster-Koordinate
stepNo - modellierter Schritt (beginnend bei 1)
lastLU - Bedeckung von (x,y) zum Zeitpunkt stepNo-1
alreadyLUCCToActualType - Flag gibt an, ob in der laufenden Iteration bereits ein LU-Wechsel in den den aktuellen Typ der Zelle (lastLU) vorgenommen wurde.
Dieses Flag wird zur Zeit nicht verwendet!

checkLUCCAllowed

protected boolean checkLUCCAllowed(int x,
                                   int y,
                                   int stepNo,
                                   int lastLU,
                                   int newLU,
                                   boolean alreadyLUCCFromNewType)
Prueft, ob ein bestimmter LU-Wechsel fuer eine Zelle erlaubt ist.

Parameters:
x - Raster-Koordinate
y - Raster-Koordinate
stepNo - modellierter Schritt (beginnend bei 1)
lastLU - Bedeckung von (x,y) zum Zeitpunkt stepNo-1
newLU - potentielle neue Bedeckung von (x,y)
alreadyLUCCFromNewType - Flag gibt an, ob in der laufenden Iteration bereits ein LU-Wechsel vom potentiellen neuen Typ in einen anderen Typ vorgenommen wurde.
Dieses Flag wird zur Zeit nicht verwendet!

checkNoData

protected static boolean checkNoData(int x,
                                     int y,
                                     WritableGrid grid)
Prueft, ob eine Rasterzelle mit NoData belegt ist

Parameters:
x - Raster-Koordinate
y - Raster-Koordinate
grid - zu pruefendes Raster