|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimnet.Histogram
Keeps a histogram about a set of data points, and computes the average and standard deviation of its data points. The first slice is from 1-resolution second slice is from resolution+1 to 2*resolution the n-th slice is from (n-1)*resolution+1 to n*resolution There are seperate statistics for 0 (and less) and greater then resolution*slices
| Field Summary | |
protected int |
acc_count
|
protected long |
count_high
|
protected long |
count_low
|
protected long[] |
count_slices
|
protected long |
count_total
|
static double[] |
DEFAULT_ORDER_STATS
The default order statistics to compute. |
static int |
GRAPH_WIDTH
The width of all Histograms. |
protected long |
max_observed
|
protected double[] |
order_stats
Which order statistics to estimate |
protected java.lang.String |
os
|
protected int |
os_idx
|
protected int |
resolution
The size of big each "slice". |
protected int |
slices
The number of slices to maintain. |
protected double |
ss
|
protected double |
sum
|
| Constructor Summary | |
Histogram(int resolution,
int slices)
Create a histogram with the specificed slice resolution and number of slices. |
|
Histogram(int resolution,
int slices,
double[] order_stats)
Create a histogram with the specificed slice resolution, number of slices, and the specific order statistics specified. |
|
| Method Summary | |
void |
clear()
Clears this histogram. |
protected void |
doActualRecord(int stat)
The internal function which actually records the given value. |
double |
getAverage()
Returns the average of the data points collected. |
long |
getCount()
Returns the number of data points collected. |
protected java.lang.String |
getGraphLine(java.lang.String start,
java.lang.String stop,
long count,
long max)
Return the output line for the given range with the given count. |
double |
getStdDev()
Returns the (population) standard deviation of the data points collected. |
void |
record(double stat)
Record the specified value (rouned up with Math.ceil). |
void |
record(int stat)
Record the specified value. |
java.lang.String |
toString()
Return the full representation histogram. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int GRAPH_WIDTH
public static final double[] DEFAULT_ORDER_STATS
protected int resolution
protected int slices
protected double[] order_stats
protected long count_total
protected long count_low
protected long[] count_slices
protected long count_high
protected long max_observed
protected double sum
protected double ss
protected int os_idx
protected java.lang.String os
protected int acc_count
| Constructor Detail |
public Histogram(int resolution,
int slices)
public Histogram(int resolution,
int slices,
double[] order_stats)
| Method Detail |
public void clear()
public void record(double stat)
public void record(int stat)
protected void doActualRecord(int stat)
protected java.lang.String getGraphLine(java.lang.String start,
java.lang.String stop,
long count,
long max)
public java.lang.String toString()
public long getCount()
public double getAverage()
public double getStdDev()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||