|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetkit.util.Histogram
netkit.util.HistogramDiscrete
public final class HistogramDiscrete
This class represents a histogram on Node field values which have DISCRETE type. The histogram keeps track of unique values and a running of how many times each value appeared.
AttributeDiscrete
,
Node
Field Summary |
---|
Fields inherited from class netkit.util.Histogram |
---|
cMap |
Constructor Summary | |
---|---|
HistogramDiscrete(double[] values,
AttributeDiscrete attribute)
This constructor is a convenience for accepting all values without any minimum occurance. |
|
HistogramDiscrete(double[] values,
AttributeDiscrete attribute,
int minOccurance)
This constructor creates a histogram object given an array of values and an attribute type. |
|
HistogramDiscrete(Edge[] edges,
AttributeDiscrete attribute)
This constructor is a convenience for accepting all edge values without any minimum occurance. |
|
HistogramDiscrete(Edge[] edges,
AttributeDiscrete attribute,
int minOccurance)
This constructor creates a histogram object given an array of edges and an attribute from which to get the values. |
|
HistogramDiscrete(Node[] nodes,
AttributeDiscrete attribute)
This constructor is a convenience for accepting all node values without any minimum occurance. |
|
HistogramDiscrete(Node[] nodes,
AttributeDiscrete attribute,
int minOccurance)
This constructor creates a histogram object given an array of nodes and an attribute from which to get the values. |
Method Summary | |
---|---|
AttributeDiscrete |
getAttribute()
Gets the attribute associated with this histogram. |
int |
getMaxValue()
Gets the maximum value stored in this object. |
double |
getMeanValue()
Gets the mean (average) value of the values in this object. |
double |
getMedianValue()
Gets the median value of the values in this object. |
int |
getMinValue()
Gets the minimum value stored in this object. |
Methods inherited from class netkit.util.Histogram |
---|
getCount, getDistribution, getMode, getSet, getTotalCount, main |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HistogramDiscrete(double[] values, AttributeDiscrete attribute)
values
- the array of double values for this object.attribute
- the attribute describing the field type.public HistogramDiscrete(double[] values, AttributeDiscrete attribute, int minOccurance)
values
- the array of double values for this object.attribute
- the attribute describing the field type.minOccurance
- the minimum number of times a value must
occur before being kept in this histogram.
java.lang.RuntimeException
- if minOccurance is less than 1.public HistogramDiscrete(Node[] nodes, AttributeDiscrete attribute)
nodes
- the array of Nodes from which to get values.attribute
- the attribute describing which field in the
Node to get values from.public HistogramDiscrete(Edge[] edges, AttributeDiscrete attribute)
edges
- the array of Edges from which to get values.attribute
- the attribute describing which field in the
Node to get values from.public HistogramDiscrete(Node[] nodes, AttributeDiscrete attribute, int minOccurance)
nodes
- the array of Nodes from which to get values.attribute
- the attribute describing the field in the Node
to get values from.minOccurance
- the minimum number of times a value must
occur before being kept in this histogram.
java.lang.RuntimeException
- if minOccurance is less than 1.public HistogramDiscrete(Edge[] edges, AttributeDiscrete attribute, int minOccurance)
edges
- the array of Edges from which to get values.attribute
- the attribute describing the field in the Node
to get values from.minOccurance
- the minimum number of times a value must
occur before being kept in this histogram.
java.lang.RuntimeException
- if minOccurance is less than 1.Method Detail |
---|
public AttributeDiscrete getAttribute()
public int getMaxValue()
public int getMinValue()
public double getMeanValue()
public double getMedianValue()
java.lang.RuntimeException
- if there are no values in this object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |