iterators
Class SteepestDescentIterator

java.lang.Object
  extended byiterators.ModelIterator
      extended byiterators.SteepestDescentIterator
All Implemented Interfaces:
java.lang.Runnable

public class SteepestDescentIterator
extends ModelIterator
implements java.lang.Runnable


Field Summary
 
Fields inherited from class iterators.ModelIterator
cells, finalScore, model, network, nParsTV, numCells, numFunctionCalls, origStopper, outFileName, p, parsTV, ps, running, runThread, theFunction, TheIteratorViewer, verbose
 
Constructor Summary
SteepestDescentIterator()
           
 
Method Summary
 ModelIterator copy()
           
 void doRun()
          // ******* This version of theFunction for diagnostic purposes only public float F(float [] thePoint) { double score,x3eight,sinx3eight,fac0,fac1,fac2,fac3; numFunctionCalls++; x3eight= 8.0 * thePoint[3]; sinx3eight = Math.sin(x3eight); sinx3eight = thePoint[3] * sinx3eight*sinx3eight; fac0 = 5.0 * (thePoint[0] - sinx3eight); score = fac0*fac0; fac1 = 5.0 * (thePoint[1] - sinx3eight); score += fac1*fac1; fac2 = Math.cos(x3eight); fac2 = 5.0 * (thePoint[2] - fac2*fac2); score += fac2*fac2; fac3 = 0.5 * Math.abs(thePoint[3]); score += fac3; return (float)score; } // ******* This version of F for diagnostic purposes only //
protected  void loadParameter(java.lang.String info, BetterTokenizer tokenizer)
           
 void loadParameters(BetterTokenizer tokenizer)
           
 
Methods inherited from class iterators.ModelIterator
continueF, didBomb, didPass, doStartRun, F, getOutputFileName, getParameterSet, getState, getStopper, getValue, init, isRunning, isSaveExtra, iterError, print, println, println, quit, reset, resetStopper, run, saveExtra, saveOutput, saveOutputTags, setFunction, setIteratorViewer, setOutputFile, setPrint, setPrintStream, setState, setStopper, startRun, stopRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

SteepestDescentIterator

public SteepestDescentIterator()
Method Detail

copy

public ModelIterator copy()
                   throws java.lang.Exception
Overrides:
copy in class ModelIterator
Throws:
java.lang.Exception

loadParameters

public void loadParameters(BetterTokenizer tokenizer)
                    throws java.lang.Exception
Overrides:
loadParameters in class ModelIterator
Throws:
java.lang.Exception

loadParameter

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

doRun

public void doRun()
// ******* This version of theFunction for diagnostic purposes only public float F(float [] thePoint) { double score,x3eight,sinx3eight,fac0,fac1,fac2,fac3; numFunctionCalls++; x3eight= 8.0 * thePoint[3]; sinx3eight = Math.sin(x3eight); sinx3eight = thePoint[3] * sinx3eight*sinx3eight; fac0 = 5.0 * (thePoint[0] - sinx3eight); score = fac0*fac0; fac1 = 5.0 * (thePoint[1] - sinx3eight); score += fac1*fac1; fac2 = Math.cos(x3eight); fac2 = 5.0 * (thePoint[2] - fac2*fac2); score += fac2*fac2; fac3 = 0.5 * Math.abs(thePoint[3]); score += fac3; return (float)score; } // ******* This version of F for diagnostic purposes only //

Overrides:
doRun in class ModelIterator