p3j.experiment.results
Class SumOverAgesSelector

java.lang.Object
  extended by p3j.experiment.results.AbstractAggregationSelector
      extended by p3j.experiment.results.SumOverAgesSelector
All Implemented Interfaces:
IAggregationSelector
Direct Known Subclasses:
MergeSubPopSumOverAgesSelector

public class SumOverAgesSelector
extends AbstractAggregationSelector

Selector to sum over ages, i.e. the result is a single number per year, giving the overall amount of people in the selected population(s).

Author:
Christina Bohk, Roland Ewald

Field Summary
 
Fields inherited from class p3j.experiment.results.AbstractAggregationSelector
aggregation
 
Constructor Summary
SumOverAgesSelector(p3j.experiment.results.IOutputVariableSelector resultsSelector, p3j.experiment.results.ISubPopulationSelector trialSelector, int generationForSelection)
          Instantiates a new sum over ages selector.
 
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

SumOverAgesSelector

public SumOverAgesSelector(p3j.experiment.results.IOutputVariableSelector resultsSelector,
                           p3j.experiment.results.ISubPopulationSelector trialSelector,
                           int generationForSelection)
Instantiates a new sum over ages selector.

Parameters:
resultsSelector - the results selector
trialSelector - the trial selector
generationForSelection - the generation for selection
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.