iterators
Class Function

java.lang.Object
  extended byiterators.Function
Direct Known Subclasses:
CooptimizerFunction, ICSamplingFunction, ICVaryingFunction, UberIteratorFunction

public class Function
extends java.lang.Object


Field Summary
 ModelRunner runner
           
 
Constructor Summary
Function()
           
Function(ModelRunner run)
           
 
Method Summary
 void addObject(Model model, BetterTokenizer tokenizer, java.lang.String eval_type, java.lang.String class_name)
           
 float continueEvaluate(ParameterSet pars)
          //ELI 7/7/99 Use this method to continue evaluating a function without resetting anything.
 Function copy()
           
 float evaluate(ParameterSet pars)
          this is the default evaluate method that just runs this models runner with its native stopper and parameter values defined by pars.
 SimpleStop getStopper()
           
 void init(ModelRunner run)
           
protected  void loadParameter(java.lang.String info, BetterTokenizer tokenizer)
           
 void loadParameters(BetterTokenizer tokenizer)
           
 void setStopper(SimpleStop stopper)
           
 void stopRun()
          Called by the iterator when it stops running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runner

public ModelRunner runner
Constructor Detail

Function

public Function()

Function

public Function(ModelRunner run)
Method Detail

init

public void init(ModelRunner run)

copy

public Function copy()
              throws java.lang.Exception
Throws:
java.lang.Exception

setStopper

public void setStopper(SimpleStop stopper)

getStopper

public SimpleStop getStopper()

stopRun

public void stopRun()
Called by the iterator when it stops running. The iterator may stop running because it finished or because the user stopped it. This function should be overridden to handle the latter case gracefully. The default behavior is to call runner.stopRun()


addObject

public void addObject(Model model,
                      BetterTokenizer tokenizer,
                      java.lang.String eval_type,
                      java.lang.String class_name)
               throws java.lang.Exception
Throws:
java.lang.Exception

evaluate

public float evaluate(ParameterSet pars)
               throws java.lang.Exception
this is the default evaluate method that just runs this models runner with its native stopper and parameter values defined by pars. The state of pars reflects any parameter changes and the resultant score is returned.

Throws:
java.lang.Exception

continueEvaluate

public float continueEvaluate(ParameterSet pars)
                       throws java.lang.Exception
//ELI 7/7/99 Use this method to continue evaluating a function without resetting anything. You should have called evaluate() before using this one. You can call this repeatedly to run a model in short steps and do something inbetween (as long as the stopping condition is set to stop appropriately. The return values are the same as with evaluate.

Throws:
java.lang.Exception

loadParameters

public void loadParameters(BetterTokenizer tokenizer)
                    throws java.lang.Exception
Throws:
java.lang.Exception

loadParameter

protected void loadParameter(java.lang.String info,
                             BetterTokenizer tokenizer)
                      throws java.lang.Exception
Throws:
java.lang.Exception