p3j.experiment.results
Class SumOverAgesSelector
java.lang.Object
p3j.experiment.results.AbstractAggregationSelector
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 selectortrialSelector
- the trial selectorgenerationForSelection
- the generation for selection
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 trialsnumOfYears
- the number of yearsnumOfAgeClasses
- 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 dirindexOrdering
- the index orderingresultExport
- the result export
- Throws:
IOException
- Signals that an I/O exception has occurred.
Copyright © 2012. All Rights Reserved.