|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.chart.AbstractChartNode com.imsl.chart.ChartNode com.imsl.chart.Data com.imsl.chart.qc.ShewhartControlChart
public class ShewhartControlChart
ShewhartControlChart
is the base class for the Shewhart control charts.
The control limits are generally calculated as
where the meaning of center and depend on the specific control chart being drawn. The variable k is the value of the attribute "ControlLimit" associated with the line being drawn. Typically there are three lines with .If all of the samples sizes are equal, the lines are horizontal.
If the sample sizes are unequal, the lines have a "stairstep" pattern.
Horizontal lines have a title drawn just above the line and right-adjusted
on the chart. The contents of the title is determined by the line's
"Title" attribute. If the title contains the placeholder "{0}",
it is replaced by the lines value. This replacement is done using
MessageFormat
.
Field Summary | |
---|---|
static double[] |
d2
This field contains the mean of the ranges of n samples from a Gaussian distribution. |
static double[] |
d3
This field contains the standard deviation of the ranges of n samples from a Gaussian distribution. |
Fields inherited from class com.imsl.chart.AbstractChartNode |
---|
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG |
Constructor Summary | |
---|---|
ShewhartControlChart(AxisXY axis)
Constructs a Shewhart control chart. |
Method Summary | |
---|---|
ControlLimit |
addCenterLine()
Adds the center line to the control chart and returns the newly added line. |
ControlLimit |
addControlLimit()
Adds a control limit to the chart. |
ControlLimit |
addLowerControlLimit()
Creates lower ControlLimit ,
adds it to the control chart,
and returns the newly created object. |
ControlLimit |
addUpperControlLimit()
Creates upper ControlLimit ,
adds it to the control chart,
and returns the newly created object. |
ControlLimit[] |
addWecoLimits()
Adds lines for the Western Electric Company Rules. |
void |
dataRange(double[] range)
Update the data range, range = {xmin,xmax,ymin,ymax} . |
double |
getCenter()
Returns the value of the attribute "Center". |
ControlLimit |
getCenterLine()
Returns the center line. |
Data |
getControlData()
Returns the Data object for the control data. |
ControlLimit |
getLowerControlLimit()
Returns the lower control limit. |
double |
getMeanSampleSize()
Returns the value of the attribute "MeanSampleSize". |
int[] |
getSampleSize()
Returns the value of the attribute "SampleSize". |
ControlLimit |
getUpperControlLimit()
Returns the upper control limit. |
void |
paint(Draw draw)
Paints this node and all of its children. |
void |
removeControlLimit(ControlLimit line)
Removes a control limit from the chart. |
void |
setCenter(double center)
Sets the value of the attribute "Center". |
Data |
setData(double[] y)
Sets the data in the control chart. |
Data |
setData(int[] y)
Sets the integer data in the control chart. |
void |
setSampleSize(int sampleSize)
Sets the value of the attribute "SampleSize". |
void |
setSampleSize(int[] sampleSize)
Sets the value of the attribute "SampleSize". |
void |
setX(double[] x)
Sets the x-coordinates of the data. |
Methods inherited from class com.imsl.chart.Data |
---|
formatLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double[] d2
NaN
because these values
are not defined.
Valid entries in the table are for n=2 through 50.
public static final double[] d3
NaN
because these values
are not defined.
Valid entries in the table are for n=2 through 50.
Constructor Detail |
---|
public ShewhartControlChart(AxisXY axis)
axis
- the AxisXY
parent of this nodeMethod Detail |
---|
public ControlLimit addCenterLine()
ControlLimit
which draws the center line.public ControlLimit addControlLimit()
ControlLimit
object.public ControlLimit addLowerControlLimit()
ControlLimit
,
adds it to the control chart,
and returns the newly created object.
ControlLimit
which draws the lower control limit line.public ControlLimit addUpperControlLimit()
ControlLimit
,
adds it to the control chart,
and returns the newly created object.
ControlLimit
which draws the upper control limit line.public ControlLimit[] addWecoLimits()
ControlLimit
corresponding to k = -2 first and
the ControlLimit
corresponding to k = +2 last.public void dataRange(double[] range)
range = {xmin,xmax,ymin,ymax}
.
The entries in range are updated to reflect the extent of
the data in this node.
The argument range
is an input/output variable. Its value should be
updated only if the data in this node is outside the range
already in the array.
dataRange
in class Data
range
- a double
array which contains the updated
range, {xmin,xmax,ymin,ymax}public double getCenter()
public ControlLimit getCenterLine()
ControlLimit
which draws the center line.public Data getControlData()
Data
object for the control data.
Data
object for charting the control data.public ControlLimit getLowerControlLimit()
ControlLimit
which draws the lower control limit line.public double getMeanSampleSize()
public int[] getSampleSize()
new int[]{1}
).public ControlLimit getUpperControlLimit()
ControlLimit
which draws the upper control limit line.public void paint(Draw draw)
paint
in class Data
draw
- a Draw
object which specifies the chart
tree to be rendered on the screenpublic void removeControlLimit(ControlLimit line)
line
- is the ControlLimit
object to be removed from this chart.public void setCenter(double center)
center
- is the value of the attribute "Center".public Data setData(double[] y)
y
- is an array containing the data values.
Data
object containing the data points.public Data setData(int[] y)
y
- is an array containing the data values.
Data
object containing the data points.public void setSampleSize(int sampleSize)
new int[]{1}
).
sampleSize
- is the value of the attribute "SampleSize".public void setSampleSize(int[] sampleSize)
sampleSize
- is the value of the attribute "SampleSize".public void setX(double[] x)
ControlLimit
added to this chart is also set.
If not set the values 0, 1, 2, ... are used.
x
- is an array containing the x-coordinates. The length of
x
must equal the length of the data array used to construct
this object.
|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |