uk.ac.leeds.ccg.andyt.projects.genesis.society.demography
Class CompareProbabilities
java.lang.Object
uk.ac.leeds.ccg.andyt.projects.genesis.society.demography.CompareProbabilities
public class CompareProbabilities
- extends java.lang.Object
Method Summary |
static java.math.BigDecimal |
compare(java.lang.String areaCode,
GENESIS_Environment _GENESIS_Environment,
GENESIS_Demographics startDemographics,
GENESIS_Demographics endDemographics,
java.io.File output_Directory,
int decimalPlacePrecisionForCalculations)
|
static double[][] |
getDataArray(java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> expected,
java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> observed,
java.math.BigDecimal multiplicand)
BigDecimal values in observed and expected are multiplied by multiplicand
and the these are converted to double precision numbers. |
static double[][] |
juggleData(double[][] data)
|
static void |
main(java.lang.String[] args)
|
static void |
output(java.util.concurrent.ExecutorService executorService,
java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> expected,
java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> observed,
java.lang.String title,
int dataWidth,
int dataHeight,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
boolean drawOriginLinesOnPlot,
int decimalPlacePrecisionForCalculations,
int decimalPlacePrecisionForDisplay,
java.math.RoundingMode roundingMode,
java.lang.Long year,
java.io.File output_Directory)
expected are the y values observed or modelled are the x values expected
are the input probabilities to a simulation observed are the resulting
probabilities of a simulation |
void |
test()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_GENESIS_Environment
public GENESIS_Environment _GENESIS_Environment
CompareProbabilities
public CompareProbabilities()
CompareProbabilities
public CompareProbabilities(GENESIS_Environment _GENESIS_Environment)
main
public static void main(java.lang.String[] args)
- Parameters:
args
- the command line arguments
test
public void test()
compare
public static java.math.BigDecimal compare(java.lang.String areaCode,
GENESIS_Environment _GENESIS_Environment,
GENESIS_Demographics startDemographics,
GENESIS_Demographics endDemographics,
java.io.File output_Directory,
int decimalPlacePrecisionForCalculations)
output
public static void output(java.util.concurrent.ExecutorService executorService,
java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> expected,
java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> observed,
java.lang.String title,
int dataWidth,
int dataHeight,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
boolean drawOriginLinesOnPlot,
int decimalPlacePrecisionForCalculations,
int decimalPlacePrecisionForDisplay,
java.math.RoundingMode roundingMode,
java.lang.Long year,
java.io.File output_Directory)
- expected are the y values observed or modelled are the x values expected
are the input probabilities to a simulation observed are the resulting
probabilities of a simulation
- Parameters:
expected
- observed
- name
- output_Directory
-
getDataArray
public static double[][] getDataArray(java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> expected,
java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> observed,
java.math.BigDecimal multiplicand)
- BigDecimal values in observed and expected are multiplied by multiplicand
and the these are converted to double precision numbers. These are
returned in a two dimensional array.
- Parameters:
expected
- observed
- multiplicand
-
- Returns:
- double[][] data integrating the expected as data[0][] and the
observed as data[1][]
juggleData
public static double[][] juggleData(double[][] data)
- Parameters:
data
- double[2][n]
- Returns:
- double[][] dataJuggled where: dataJuggled[0][] = data[1][];
dataJuggled[1][] = data[0][]; *
double[][] dataJuggled = new double[data.length][data[0].length];
for (int i = 0; i < data[0].length; i++) {
dataJuggled[0][i] = data[1][i];
dataJuggled[1][i] = data[0][i];
}
return dataJuggled;