|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp3j.simulation.calculation.deterministic.AbstractPopulation<P,R>
P
- the parameter classR
- the result classpublic abstract class AbstractPopulation<P extends BasicParameters,R extends BasicResults>
Base class for population calculations. This method does not conform to ESCA-JAVA0138, but the methods that have more than 5 parameters are very short and therefore still easy to understand. Created on July 22, 2006
Field Summary | |
---|---|
static double |
FORCE_MORT_INTERVAL
Distribution of deaths in half years of an entire single age year. |
Constructor Summary | |
---|---|
AbstractPopulation()
|
Method Summary | |
---|---|
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(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double FORCE_MORT_INTERVAL
Constructor Detail |
---|
public AbstractPopulation()
Method Detail |
---|
public abstract R calculatePopulation(P parameters)
parameters
- the parameters requires to population calculation
protected 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 year
protected 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 age
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |