Package microsim.statistics.functions
Class PercentileArrayFunction
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.functions.AbstractArrayFunction
microsim.statistics.functions.PercentileArrayFunction
- All Implemented Interfaces:
EventListener,IDoubleSource,IUpdatableSource
This function calculates percentiles (p1,p5,p10-p90,p95,p99) for a given cross section of data. Input currently must be doubleArray double[].
- Author:
- Patryk Bronka
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleFields inherited from class microsim.statistics.functions.AbstractArrayFunction
dblSource, fltSource, intSource, lngSource, type, TYPE_DBL, TYPE_FLT, TYPE_INT, TYPE_LNGFields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker -
Constructor Summary
ConstructorsConstructorDescriptionCreate a percentile function on a double array source.Create a percentile function on a float array source.Create a percentile function on an integer array source.Create a percentile function on a long array source. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(double[] data) Apply the function on a the given array of double values.voidapply(float[] data) Apply the function on a the given array of float values.voidapply(int[] data) Apply the function on a the given array of integer values.voidapply(long[] data) Apply the function on a the given array of long values.doublegetDoubleValue(Enum<?> variableID) Return the double value corresponding to the given variableIDMethods inherited from class microsim.statistics.functions.AbstractArrayFunction
applyFunctionMethods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, onEvent, setCheckingTime, updateSource
-
Field Details
-
p1
protected double p1 -
p5
protected double p5 -
p10
protected double p10 -
p20
protected double p20 -
p25
protected double p25 -
p30
protected double p30 -
p40
protected double p40 -
p50
protected double p50 -
p60
protected double p60 -
p70
protected double p70 -
p75
protected double p75 -
p80
protected double p80 -
p90
protected double p90 -
p95
protected double p95 -
p99
protected double p99
-
-
Constructor Details
-
PercentileArrayFunction
Create a percentile function on a float array source.- Parameters:
source- The data source.
-
PercentileArrayFunction
Create a percentile function on an integer array source.- Parameters:
source- The data source.
-
PercentileArrayFunction
Create a percentile function on a long array source.- Parameters:
source- The data source.
-
PercentileArrayFunction
Create a percentile function on a double array source.- Parameters:
source- The data source.
-
-
Method Details
-
apply
public void apply(double[] data) Description copied from class:AbstractArrayFunctionApply the function on a the given array of double values.- Overrides:
applyin classAbstractArrayFunction- Parameters:
data- A source array of values.
-
apply
public void apply(float[] data) Description copied from class:AbstractArrayFunctionApply the function on a the given array of float values.- Overrides:
applyin classAbstractArrayFunction- Parameters:
data- A source array of values.
-
apply
public void apply(int[] data) Description copied from class:AbstractArrayFunctionApply the function on a the given array of integer values.- Overrides:
applyin classAbstractArrayFunction- Parameters:
data- A source array of values.
-
apply
public void apply(long[] data) Description copied from class:AbstractArrayFunctionApply the function on a the given array of long values.- Overrides:
applyin classAbstractArrayFunction- Parameters:
data- A source array of values.
-
getDoubleValue
Description copied from interface:IDoubleSourceReturn the double value corresponding to the given variableID- Specified by:
getDoubleValuein interfaceIDoubleSource- Parameters:
variableID- A unique identifier for a variable.- Returns:
- The current double value of the required variable.
-