|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetkit.util.Histogram
netkit.util.HistogramCategorical
public final class HistogramCategorical
This class represents a histogram on Node field values which have CATEGORICAL type. The histogram keeps track of unique values and a running of how many times each value appeared.
AttributeCategorical,
Node| Field Summary |
|---|
| Fields inherited from class netkit.util.Histogram |
|---|
cMap |
| Constructor Summary | |
|---|---|
HistogramCategorical(double[] values,
AttributeCategorical attribute)
This constructor is a convenience for accepting all values without any minimum occurance. |
|
HistogramCategorical(double[] values,
AttributeCategorical attribute,
int minOccurance)
This constructor creates a histogram object given an array of values and an attribute type. |
|
HistogramCategorical(Edge[] edges,
AttributeCategorical attribute)
This constructor is a convenience for accepting all edge values without any minimum occurance. |
|
HistogramCategorical(Edge[] edges,
AttributeCategorical attribute,
int minOccurance)
This constructor creates a histogram object given an array of edges and an attribute from which to get the values. |
|
HistogramCategorical(Node[] nodes,
AttributeCategorical attribute)
This constructor is a convenience for accepting all node values without any minimum occurance. |
|
HistogramCategorical(Node[] nodes,
AttributeCategorical 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 | |
|---|---|
AttributeCategorical |
getAttribute()
Gets the attribute associated with this histogram. |
double |
getCount(java.lang.String token)
Gets the number of times a particular categorical token appears in this histogram. |
| 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 HistogramCategorical(double[] values,
AttributeCategorical attribute)
values - the array of double values for this object.attribute - the attribute describing the field type.
public HistogramCategorical(double[] values,
AttributeCategorical 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 HistogramCategorical(Edge[] edges,
AttributeCategorical 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 HistogramCategorical(Node[] nodes,
AttributeCategorical 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 HistogramCategorical(Node[] nodes,
AttributeCategorical 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 HistogramCategorical(Edge[] edges,
AttributeCategorical 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 AttributeCategorical getAttribute()
public double getCount(java.lang.String token)
token - the token to lookup in the histogram.
java.lang.RuntimeException - if the token isn't valid for this
histogram's attribute.
java.lang.NullPointerException - if the token value doesn't exist
in this histogram.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||