p3j.experiment.results
Class YearlyAgeTrialMatrixSelector

java.lang.Object
  extended by p3j.experiment.results.AbstractAggregationSelector
      extended by p3j.experiment.results.YearlyAgeTrialMatrixSelector
All Implemented Interfaces:
IAggregationSelector

public class YearlyAgeTrialMatrixSelector
extends AbstractAggregationSelector

Aggregates a trial x age matrix for a given year.

Author:
Christina Bohk, Roland Ewald

Field Summary
 
Fields inherited from class p3j.experiment.results.AbstractAggregationSelector
aggregation
 
Constructor Summary
YearlyAgeTrialMatrixSelector(AbstractAggregationSelector[] addSels, AbstractAggregationSelector[] subSels, String customFileName, int yearOfInterest)
          Creates a age x trial matrix selector for a single year.
YearlyAgeTrialMatrixSelector(List<AbstractAggregationSelector> selectorsForAddition, List<AbstractAggregationSelector> selectorsForSubtraction, String customFileName, int yearOfInterest)
          Creates a age x trial matrix selector for a single year.
 
Method Summary
 void consider(int trialCount, ResultsOfTrial result)
          Called to consider a single result.
 void finish(File destinationDir, List<Integer> indexOrdering, ResultExport resultExport)
          Finishing the aggregation.
 void init(int numOfTrials, int numOfYears, int numOfAgeClasses)
          Initialize the number of age classes etc.
 
Methods inherited from class p3j.experiment.results.AbstractAggregationSelector
cutOffUnused, getCopy, getFileName, reorderResults, select, sumPerElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YearlyAgeTrialMatrixSelector

public YearlyAgeTrialMatrixSelector(AbstractAggregationSelector[] addSels,
                                    AbstractAggregationSelector[] subSels,
                                    String customFileName,
                                    int yearOfInterest)
Creates a age x trial matrix selector for a single year.

Parameters:
addSels - the list of selected results to be added
subSels - the list of selected results to be subtracted
customFileName - a custom file name
yearOfInterest - the year of interest

YearlyAgeTrialMatrixSelector

public YearlyAgeTrialMatrixSelector(List<AbstractAggregationSelector> selectorsForAddition,
                                    List<AbstractAggregationSelector> selectorsForSubtraction,
                                    String customFileName,
                                    int yearOfInterest)
Creates a age x trial matrix selector for a single year.

Parameters:
addSels - the list of selected results to be added
subSels - the list of selected results to be subtracted
customFileName - a custom file name
yearOfInterest - the year of interest
Method Detail

init

public void init(int numOfTrials,
                 int numOfYears,
                 int numOfAgeClasses)
Description copied from interface: IAggregationSelector
Initialize the number of age classes etc.

Parameters:
numOfTrials - the number of trials
numOfYears - the number of years
numOfAgeClasses - the number of age classes

consider

public void consider(int trialCount,
                     ResultsOfTrial result)
Description copied from interface: IAggregationSelector
Called to consider a single result.

Parameters:
trialCount - the trial count (i.e. index)
result - the result

finish

public void finish(File destinationDir,
                   List<Integer> indexOrdering,
                   ResultExport resultExport)
            throws IOException
Description copied from interface: IAggregationSelector
Finishing the aggregation. Called after all relevant results have been considered, use this to write results.

Parameters:
destinationDir - the destination dir
indexOrdering - the index ordering
resultExport - the result export
Throws:
IOException - Signals that an I/O exception has occurred.


Copyright © 2012. All Rights Reserved.