|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.spc.math.ValuesCalculator
public abstract class ValuesCalculator extends java.lang.Object
Base class for chart values calculators. Implements basic calculation functions.
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
nullName
|
| Constructor and Description |
|---|
ValuesCalculator()
Base constructor. |
| Modifier and Type | Method and Description |
|---|---|
protected double |
average(ChartDataModel dataModel)
Calculates average of all values in the data model. |
protected ChartDataModel |
fill(double[] values,
ChartDataModel srcModel)
Constructs data model from the array of numbers. |
protected void |
fill(double[] values,
ChartDataModel srcModel,
ChartDataModel dstModel)
Fills given data model from the array of numbers. |
protected void |
fillColumn(ChartDataModel srcModel,
ChartDataModel dstModel,
int column)
Fills given data model with a specified column from the source data model. |
protected ChartDataModel |
fillColumn(ChartDataModel srcModel,
int column)
Fills chart data model with a specified column from the source data model. |
protected ChartDataModel |
fillConstant(java.lang.Object value,
ChartDataModel srcModel)
Fills the data model with the constant value. |
void |
fillConstant(java.lang.Object value,
ChartDataModel srcModel,
ChartDataModel dstModel)
Fills the data model with the constant value. |
protected double |
getAverage(ChartDataModel dataModel)
Calculates average value of values in the data model. |
protected double |
getc4(int n)
Gets c4 value, dependent from size. |
protected double |
getColumn(int no,
java.lang.Object value)
Gets a value form a specified column in a sample. |
protected double |
getd2(int n)
Gets d2 value, dependent from size. |
protected double |
getd3(int n)
Gets d3 value, dependent from size. |
protected double |
getD3(int n)
Gets D3 value, dependent from size. |
protected double |
getD4(int n)
Gets D4 value, dependent from size. |
static java.lang.Double |
getDouble(java.lang.Object value)
Converts number,string to double |
protected double |
getE(int subgroupSize)
Gets e value, dependent from subgroup size. |
protected double |
getF(int subgroupSize)
Gets f value, dependent from subgroup size. |
protected double |
getG(int n)
Gets g value, dependent from size. |
protected double |
getH(int n)
Gets h value, dependent from size. |
static boolean |
isEmpty(java.lang.Object value)
Checks if the value is empty (null of empty string) |
protected boolean |
isNconstant(ChartDataModel dataModel)
Checks if data contains constant samples count (in all sample sets). |
protected abstract void |
validateDataModel(ChartDataModel dataModel)
Validates data model. |
protected void |
validateDataModel(ChartDataModel dataModel,
int minColumns,
int maxColumns)
Deprecated. |
protected void |
validateDataModel(java.lang.String name,
ChartDataModel dataModel,
java.lang.Integer minColumns,
java.lang.Integer maxColumns,
java.lang.Integer minRows,
java.lang.Integer maxRows)
Validates data model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String nullName
| Constructor Detail |
|---|
public ValuesCalculator()
| Method Detail |
|---|
protected boolean isNconstant(ChartDataModel dataModel)
dataModel - input data model.
protected double getColumn(int no,
java.lang.Object value)
throws DataFormatException
no - column number.value - data sample.DataFormatException - when the input data are invalid.
protected double getAverage(ChartDataModel dataModel)
throws DataFormatException
dataModel - input data modelDataFormatException - then data model is empty or does not contain numbers.
protected double average(ChartDataModel dataModel)
throws DataFormatException
dataModel - input data model.DataFormatException - when the input data are invalid.
protected ChartDataModel fillColumn(ChartDataModel srcModel,
int column)
srcModel - source data model.column - column number
protected void fillColumn(ChartDataModel srcModel,
ChartDataModel dstModel,
int column)
srcModel - source data model.dstModel - data model filled with the keys and a constant values.column - column number
protected ChartDataModel fill(double[] values,
ChartDataModel srcModel)
throws DataFormatException
values - source valuessrcModel - source model (for key values)DataFormatException - then source values array or source model is null.
protected void fill(double[] values,
ChartDataModel srcModel,
ChartDataModel dstModel)
throws DataFormatException
values - source valuessrcModel - source model (for key values)dstModel - data model filled with the keys from the source model and values from the array.DataFormatException - then source values array or source model is null.
protected ChartDataModel fillConstant(java.lang.Object value,
ChartDataModel srcModel)
value - the value to fill in.srcModel - source data model.
public void fillConstant(java.lang.Object value,
ChartDataModel srcModel,
ChartDataModel dstModel)
value - the value to fill in.srcModel - source data model.dstModel - data model filled with the keys and a constant values.
protected double getE(int subgroupSize)
throws DataFormatException
subgroupSize - subgroup sizeDataFormatException - then 'e' does not contain value with the given key
protected double getF(int subgroupSize)
throws DataFormatException
subgroupSize - subgroup sizeDataFormatException - then 'f' does not contain value with the given key
protected double getG(int n)
throws DataFormatException
n - sizeDataFormatException - then 'g' does not contain value with the given key
protected double getH(int n)
throws DataFormatException
n - sizeDataFormatException - then 'h' does not contain value with the given key
protected double getd2(int n)
throws DataFormatException
n - sizeDataFormatException - then 'd2' does not contain value with the given key
protected double getc4(int n)
throws DataFormatException
n - sizeDataFormatException - then 'c4' does not contain value with the given key
protected double getd3(int n)
throws DataFormatException
n - sizeDataFormatException - then 'd3' does not contain value with the given key
protected double getD3(int n)
throws DataFormatException
n - sizeDataFormatException - then 'D3' does not contain value with the given key
protected double getD4(int n)
throws DataFormatException
n - sizeDataFormatException - then 'D4' does not contain value with the given key
protected void validateDataModel(java.lang.String name,
ChartDataModel dataModel,
java.lang.Integer minColumns,
java.lang.Integer maxColumns,
java.lang.Integer minRows,
java.lang.Integer maxRows)
throws DataFormatException
name - data model name.dataModel - data model to validate.minColumns - the minimum count of columns required in the data model.maxColumns - the maximum count of columns required in the data model.minRows - the minimum count of rows required in the data model.maxRows - the maximum count of rows required in the data model.DataFormatException - when the input model does not satisfy constraints.
@Deprecated
protected void validateDataModel(ChartDataModel dataModel,
int minColumns,
int maxColumns)
throws DataFormatException
DataFormatException
public static java.lang.Double getDouble(java.lang.Object value)
throws DataFormatException
value - number in some format (string, number, integer, ...)DataFormatException - when conversion is not possible (ex.: text string).public static boolean isEmpty(java.lang.Object value)
value - input value.
protected abstract void validateDataModel(ChartDataModel dataModel)
throws DataFormatException
dataModel - input chart data model.DataFormatException - when the data is invalid.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||