jInfer

cz.cuni.mff.ksi.jinfer.iss.experiments
Class AbstractExperimentSet

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.iss.experiments.AbstractExperimentSet
All Implemented Interfaces:
NamedModule, ExperimentSet
Direct Known Subclasses:
AbstractChainedIHs, BestIHForGlpk, BestStandaloneCH, ChainedIHs1Tweak, CHForMutation, FidaxWithHungry, GlpkInterfaceTiming, GrammarModelTiming, IgnoreTextData, PingAll, RandomLocalBranching, RandomVsFuzzyVsFidaxStart, TimeQuality, TimeTillOptimum, VariousBetas

public abstract class AbstractExperimentSet
extends Object
implements ExperimentSet

Abstract implementation of an experiment set. After it gets the list of experiments (via ExperimentParameters) to run, it starts to execute them sequentially.


Field Summary
protected static int POOL_SIZE
           
protected  File resultCsv
           
 
Constructor Summary
AbstractExperimentSet()
           
 
Method Summary
 String getDisplayName()
          Returns a user friendly name of the module.
protected abstract  List<ExperimentParameters> getExperiments()
          Should return the list of experiment parameters to be run in this set.
 String getModuleDescription()
          Returns the information about this module's inner workings.
protected  void notifyFinished(Experiment e, int iteration)
          Notification that the current iteration has finished.
protected  void notifyFinishedAll()
          Notification that the experiment set has finished.
protected  void notifyStart()
          Notification that the experiment set run is starting (this does not happen if we start from index higher than 0).
 void run(int from)
          Run the experiment set from the specified index (first is 0), whatever that means.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.mff.ksi.jinfer.base.interfaces.NamedModule
getName
 

Field Detail

POOL_SIZE

protected static final int POOL_SIZE
See Also:
Constant Field Values

resultCsv

protected final File resultCsv
Constructor Detail

AbstractExperimentSet

public AbstractExperimentSet()
Method Detail

getExperiments

protected abstract List<ExperimentParameters> getExperiments()
Should return the list of experiment parameters to be run in this set.

Returns:
List of experiment parameters that will be sequentially run in this experimental set.

run

public void run(int from)
         throws InterruptedException
Description copied from interface: ExperimentSet
Run the experiment set from the specified index (first is 0), whatever that means.

Specified by:
run in interface ExperimentSet
Throws:
InterruptedException

notifyStart

protected void notifyStart()
Notification that the experiment set run is starting (this does not happen if we start from index higher than 0). We do not want to force descendants to override this, thus it is not abstract.


notifyFinished

protected void notifyFinished(Experiment e,
                              int iteration)
Notification that the current iteration has finished. This implementation writes the full report providied by the experiment that has finished in a file named with the iteration (123.txt). It is OK to override this method and not call super, if this logic is unnecessary.

Parameters:
e - Object representing the experiment that has currently finished running.
iteration - Iteration - index in the list of all the experiments in this set - that was just finished. Note that the numbering starts from 0.

notifyFinishedAll

protected void notifyFinishedAll()
Notification that the experiment set has finished. We do not want to force descendants to override this, thus it is not abstract.


getDisplayName

public String getDisplayName()
Description copied from interface: NamedModule
Returns a user friendly name of the module. This name is not neccessary unique.

Specified by:
getDisplayName in interface NamedModule
Returns:
Displayable module name.

getModuleDescription

public String getModuleDescription()
Description copied from interface: NamedModule
Returns the information about this module's inner workings. Most of the time will be equal to a call to NamedModule.getDisplayName(), but if the module for example consists of more sub-modules, their names should be listed here.

Specified by:
getModuleDescription in interface NamedModule
Returns:
String describing inner structure of the module.

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011