P
- the parameter classR
- the result classpublic abstract class AbstractPopulation<P extends BasicParameters,R extends BasicResults> extends Object
Modifier and Type | Field and Description |
---|---|
static double |
FORCE_MORT_INTERVAL
Distribution of deaths in half years of an entire single age year.
|
Constructor and Description |
---|
AbstractPopulation() |
Modifier and Type | Method and Description |
---|---|
protected static void |
calculateByMult(int startAge,
int endAge,
int year,
Matrix2D target,
Matrix2D source,
Matrix2D mult)
Calculates target matrix by multiplying source and the field from the
multiplication matrix at the same age and year position.
|
protected static void |
calculateByMultMin1(int startAge,
int endAge,
int year,
Matrix2D target,
Matrix2D source,
Matrix2D mult)
Calculates target matrix by multiplying source and the field from the
multiplication matrix that correspond to the year and age (column and row)
above/before (- 1).
|
abstract R |
calculatePopulation(String subPopName,
int generation,
P parameters)
Calculate population.
|
protected static void |
calculateRestOfMeanPopulation(Matrix2D target,
Matrix2D endPopulation,
Matrix2D p2,
Matrix2D survO100,
Matrix2D liveBirthProp,
int year,
double numberOfChilds,
int maxAge)
Calculates the first and the last age group of the mean population.
|
protected static void |
calculateSurvivalProbabilities(BasicParameters parameters,
BasicResults results)
Calculate survival probabilities for both halves of the year.
|
protected static void |
getFirstHalfyearSurvProb(Matrix2D target,
Matrix2D deathProbInfant1half,
Matrix2D mortality,
int numOfYears,
int maxAge)
Calculates survival probabilities for the first half of a year.
|
protected static double |
getNumOfChilds(Matrix2D meanFemalePop,
Matrix2D fertility,
int year)
Calculates number of children in current year.
|
protected static void |
getSecondHalfyearSurvProb(Matrix2D target,
Matrix2D deathProbInfant1half,
Matrix2D mortality,
int numOfYears,
int maxAge)
Calculates survival probabilities for the second half of a year.
|
public static final double FORCE_MORT_INTERVAL
public abstract R calculatePopulation(String subPopName, int generation, P parameters)
subPopName
- the sub-population namegeneration
- the generationparameters
- the parameters requires to population calculationprotected static void getFirstHalfyearSurvProb(Matrix2D target, Matrix2D deathProbInfant1half, Matrix2D mortality, int numOfYears, int maxAge)
target
- matrix to store results indeathProbInfant1half
- death probabilities of infants within the first 6 monthsmortality
- mortality matrixnumOfYears
- number of years to be calculatedmaxAge
- the maximum ageprotected static void getSecondHalfyearSurvProb(Matrix2D target, Matrix2D deathProbInfant1half, Matrix2D mortality, int numOfYears, int maxAge)
target
- matrix to store results indeathProbInfant1half
- death probabilities of infants within the first 6 monthsmortality
- mortality matrixnumOfYears
- number of years to be calculatedmaxAge
- the maximum ageprotected static void calculateSurvivalProbabilities(BasicParameters parameters, BasicResults results)
parameters
- the parametersresults
- the resultsprotected static void calculateByMultMin1(int startAge, int endAge, int year, Matrix2D target, Matrix2D source, Matrix2D mult)
startAge
- start ageendAge
- end ageyear
- current yeartarget
- target matrixsource
- source matrixmult
- multiplication matrixprotected static void calculateByMult(int startAge, int endAge, int year, Matrix2D target, Matrix2D source, Matrix2D mult)
startAge
- start ageendAge
- end ageyear
- current yeartarget
- target matrixsource
- source matrixmult
- multiplication matrixprotected static double getNumOfChilds(Matrix2D meanFemalePop, Matrix2D fertility, int year)
meanFemalePop
- mean female populationfertility
- fertilityyear
- current yearprotected static void calculateRestOfMeanPopulation(Matrix2D target, Matrix2D endPopulation, Matrix2D p2, Matrix2D survO100, Matrix2D liveBirthProp, int year, double numberOfChilds, int maxAge)
target
- mean population matrixendPopulation
- end population matrixp2
- P_2 matrix (survival probabilities of infants in second half-year
of their first year)survO100
- survival probabilities of the over-100-years-oldsliveBirthProp
- proportions of live births belonging to this sexyear
- current yearnumberOfChilds
- (overall) number of childrenmaxAge
- the maximal ageCopyright © 2013. All Rights Reserved.