edu.ucsb.cs.jicos.services.tasks
Class MinSolution

java.lang.Object
  extended by edu.ucsb.cs.jicos.services.Task
      extended by edu.ucsb.cs.jicos.services.Compose
          extended by edu.ucsb.cs.jicos.services.tasks.MinSolution
All Implemented Interfaces:
java.io.Serializable

public final class MinSolution
extends Compose

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.ucsb.cs.jicos.services.Task
ALL_INPUTS
 
Constructor Summary
MinSolution()
           
 
Method Summary
 java.lang.Object execute(Environment environment)
          This method returns the Solution Object among its inputs, whose IntUpperBound has minimal intValue, provided that it is at least as low as the Shared objects intValue.
 boolean executeOnServer(Environment environment)
          This task executes on the task server.
 
Methods inherited from class edu.ucsb.cs.jicos.services.Task
compute, execute, executeIncrementally, getInput, getTaskId, isAtomic, numInputs, numUnsetInputs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MinSolution

public MinSolution()
Method Detail

execute

public java.lang.Object execute(Environment environment)
This method returns the Solution Object among its inputs, whose IntUpperBound has minimal intValue, provided that it is at least as low as the Shared objects intValue. Otherwise, it returns null, indicating that none of its input Solution objects is the current best.

Specified by:
execute in class Task
Parameters:
environment - The environment's Shared Object defines the currently best known minimal intValue associated with a Solution. It is possible, though unlikely, that the Task's input Solutions contain a better one than the TaskServer knows about, as reflected in the Environment's Shared object's intValue. If this occurs, a side-effect of the execute method is to update the Environment's Shared object accordingly.
Returns:
the Solution Object among its inputs, whose IntUpperBound has minimal intValue, provided that it is at least as low as the Shared objects intValue. Otherwise, it returns null, indicating that none of its input Solution objects is the current best.

executeOnServer

public boolean executeOnServer(Environment environment)
This task executes on the task server.

Overrides:
executeOnServer in class Task
Parameters:
environment - Session environment (ignored).
Returns:
true: This task executes on the task server.


Jicos: http://cs.ucsb.edu/projects/jicos