package iterators; /** This class is only an iterator for convenience. Its purpose is to take an input cam file, filter out a portion of the parameter sets, and save a new cam file containing just those parameter sets. The filtering is done in the cam graph screen itself - this iterator is basically just a dummy class that gets the GeneNet machinery to read each cam in turn and save it back out if it meets the filtering criteria.
To use this class, make an iterator file that looks like:
&Iterator UberIterator "UI.txt"
&OutfileName filename
&RunMode FromCam
&endUSParams
&Evaluators
&Iterator I1 StartAtBeginning Autopass Savefinalpars
&FilterCamIterator
&endIterator
&endEvaluators
&ParamsToVary

&endParamsToVary
&endIterator
&endHeader
*/ public class FilterCamIterator extends ModelIterator implements Runnable { float minVal, maxVal; int [] nodes = new int[5]; float [] nodeRanges = new float[10]; int numNodes; int delay; public FilterCamIterator() { setPrint(true); } // Have a no argument initializer so we can do new_by_name public ModelIterator copy() throws Exception { FilterCamIterator newIter = new FilterCamIterator(); newIter.init(this.network, this.model); newIter.nParsTV = this.nParsTV; newIter.parsTV = this.parsTV.copy(); newIter.theFunction = this.theFunction.copy(); newIter.minVal = minVal; newIter.maxVal = maxVal; return newIter; } public void doRun() { finalScore = 0; super.stopRun(); } }