pop.model
Class Population

java.lang.Object
  |
  +--pop.model.Population

public class Population
extends java.lang.Object

A total population or a particular population group (such as an ethnic group). Consists of both male and female age cohorts, and associated fertility and mortality rates.

See Also:
Cohort, Fertility, Mortality

Constructor Summary
Population()
          Unavailable.
Population(int[][] base_pop, java.lang.String name, Fertility fertility, Mortality mortality)
          Basic constructor.
Population(PopulationSizes sizes, java.lang.String name, Fertility fertility, Mortality mortality)
          Alternate constructor takes a PopulationSizes object instead of an array of initial population sizes.
 
Method Summary
 int[][] all_sizes()
          Returns 2-dimensional array of population sizes for the current year.
 int[][] deaths()
          Returns 2-dimensional array of deaths for the current year.
 int female_births()
          Returns number of female births for the current year.
 int[] female_deaths()
          Returns age-array of female deaths for the current year.
 int[] female_sizes()
          Returns age-array of female population sizes, current year.
 double fertility(int age)
          Returns age-specific fertility rate.
 void increment(Migration migrants)
          Increments this population one year.
 int male_births()
          Returns number of male births for the current year.
 int[] male_deaths()
          Returns age-array of male deaths for the current year.
 int[] male_sizes()
          Returns age-array of male population sizes, current year.
 double mortality(int age, int sex)
          Returns age- and sex-specific mortality rate.
 java.lang.String name()
          Returns name of this population.
 double proportion_female_births()
          Returns proportion of total births resulting in female children.
 int size(int age, int sex)
          Returns age- and sex-specific current population size (excludes migration for current year).
 int total_births()
          Returns total number of births for the current year.
 int total_deaths()
          Returns sum of all female and male deaths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Population

public Population(int[][] base_pop,
                  java.lang.String name,
                  Fertility fertility,
                  Mortality mortality)
Basic constructor.
Parameters:
base_pop - - 2-dimensional array of population by sex (first dimension, with females in the first row, males second row) and age (second dimension) for year zero.
name - - label used to display results for this population segment.
fertility - - reference to associated fertility object.
mortality - - reference to associated mortality object.

Population

public Population(PopulationSizes sizes,
                  java.lang.String name,
                  Fertility fertility,
                  Mortality mortality)
Alternate constructor takes a PopulationSizes object instead of an array of initial population sizes.
Parameters:
initial_sizes - - reference to PopulationSizes object.
name - - label used to display results for this population segment.
fertility - - reference to associated fertility object.
mortality - - reference to associated mortality object.

Population

public Population()
Unavailable.
Method Detail

size

public int size(int age,
                int sex)
Returns age- and sex-specific current population size (excludes migration for current year).
Parameters:
age - - 0 to maximum cohort age.
sex - - FEMALE or MALE, static constant from Statics.

female_sizes

public int[] female_sizes()
Returns age-array of female population sizes, current year.

male_sizes

public int[] male_sizes()
Returns age-array of male population sizes, current year.

all_sizes

public int[][] all_sizes()
Returns 2-dimensional array of population sizes for the current year. First dimension of array is sex (with females in the first row, males second row) and second dimension is age.

fertility

public double fertility(int age)
Returns age-specific fertility rate.
Parameters:
age - - 0 to maximum cohort age.

proportion_female_births

public double proportion_female_births()
Returns proportion of total births resulting in female children.

mortality

public double mortality(int age,
                        int sex)
Returns age- and sex-specific mortality rate.
Parameters:
age - - 0 to maximum cohort age.
sex - - FEMALE or MALE, static constant from Statics.

increment

public void increment(Migration migrants)
Increments this population one year. The basic demographic equation is applied, as births are added to the 0 age group, survivors of each cohort are moved forward one year, and migrants are added to these results.
Parameters:
migrants - - one year of migration, by age and sex.

total_births

public int total_births()
Returns total number of births for the current year.

female_births

public int female_births()
Returns number of female births for the current year.

male_births

public int male_births()
Returns number of male births for the current year.

female_deaths

public int[] female_deaths()
Returns age-array of female deaths for the current year.

male_deaths

public int[] male_deaths()
Returns age-array of male deaths for the current year.

deaths

public int[][] deaths()
Returns 2-dimensional array of deaths for the current year. First dimension of array is sex (with females in the first row, males second row) and second dimension is age.

total_deaths

public int total_deaths()
Returns sum of all female and male deaths.

name

public java.lang.String name()
Returns name of this population.