|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.statcato.graph.StemAndLeafPlot
public class StemAndLeafPlot
A stem-and-leaf plot.
Field Summary | |
---|---|
static boolean |
DEBUG
Debug flag. |
boolean |
displayEmptyStem
A boolean variable indicating whether stems with no leaves should be displayed. |
Constructor Summary | |
---|---|
StemAndLeafPlot(java.util.Vector<java.lang.Double> values,
double u)
Constructor. |
Method Summary | |
---|---|
static double |
computeCommonLeafUnit(java.util.Vector<java.lang.Double> units)
Returns the common leaf unit that should be used for the given set of leaf units. |
static double |
computeLeafUnit(double x)
Computes and returns the proper leaf unit for the given number. |
static int |
getLeaf(double value,
double place)
Returns the leaf of the given double value at the given leaf unit. |
static int |
getLeafIndex(double value,
double place)
Returns the index of the starting location of the leaf in given data value. |
double |
getLeafUnits()
Returns the leaf unit used in this stem-and-leaf plot. |
static double |
getStem(double value,
double place)
Returns the stem for the given data value given the leaf unit. |
static void |
printDebug(java.lang.String msg)
Prints the given debug message to the standard output. |
java.lang.String |
toString()
Returns an html formatted string of a table containing the stems and leaves. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG
public boolean displayEmptyStem
Constructor Detail |
---|
public StemAndLeafPlot(java.util.Vector<java.lang.Double> values, double u)
values
- vector of double valuesu
- leaf unit (10^x where x is an integer, -1 if the leaf unit is
not pre-determined)Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public double getLeafUnits()
public static double getStem(double value, double place)
value
- double valueplace
- leaf unit (double)
public static int getLeafIndex(double value, double place)
value
- double valueplace
- leaf unit
public static int getLeaf(double value, double place)
value
- double valueplace
- leaf unit
public static double computeLeafUnit(double x)
x
- a double value
public static double computeCommonLeafUnit(java.util.Vector<java.lang.Double> units)
units
- vector of leaf units (double values)
public static void printDebug(java.lang.String msg)
msg
- string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |