|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetkit.classifiers.aggregators.AggregatorImp
public abstract class AggregatorImp
This should be the parent for any Aggregator class. It sets up the basic structure for an Aggregator and defines most of the needed API. The only thing needed to be implemented by any subclass is the getValue(Node, Estimate) method.
Attribute,
Attributes,
Node| Field Summary | |
|---|---|
protected SharedNodeInfo |
aggregateCache
|
protected int |
attribIdx
|
protected Attribute |
attribute
|
protected EdgeType |
edgeType
|
protected java.lang.String |
name
|
protected Type |
type
|
| Constructor Summary | |
|---|---|
|
AggregatorImp(java.lang.String aggName,
EdgeType edgeType,
Attribute attribute,
Type type)
Creates an aggregator that is not by value (it calls the more specific constructor with a 'value' of Double.NaN). |
protected |
AggregatorImp(java.lang.String aggName,
EdgeType edgeType,
Attribute attribute,
Type type,
double value)
Helper constructor for AggregatorByValueImp - an aggregator for a specific attribute value. |
| Method Summary | |
|---|---|
Attribute |
getAttribute()
What is the attribute that is being aggregated |
protected int |
getAttributeIndex(java.lang.String nodeType)
Get the index of the attribute in the instance vector array--we need to go through a node to get at this information. |
EdgeType |
getEdgeType()
What is the relation that should be used to get at the neighbors of an instance |
java.lang.String |
getName()
Gets the name of the field represented by this object. |
protected SharedNodeInfo |
getNodeInfo(Node node)
This is cached aggregation information about the node as is relevant to the relationship that this aggregator uses. |
Type |
getType()
Gets the Type of the value stored in this object. |
double |
getValue(Node n)
Aggregate around the given node in the graph and return the result. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface netkit.classifiers.aggregators.Aggregator |
|---|
getValue |
| Field Detail |
|---|
protected final java.lang.String name
protected SharedNodeInfo aggregateCache
protected final Attribute attribute
protected final Type type
protected final EdgeType edgeType
protected int attribIdx
| Constructor Detail |
|---|
protected AggregatorImp(java.lang.String aggName,
EdgeType edgeType,
Attribute attribute,
Type type,
double value)
aggName - The prefix name of this aggregated attribute. Normally the name of the aggregator (e.g., 'min' or 'max')edgeType - The name of the edge type to traverse to get at the neighboring nodesattribute - The attribute of the neighbor nodes to aggregate overtype - The attribute type of this aggregatorvalue - The value of the attribute to aggregate on (e.g., the double representing 'red'). Use Double.NaN if it is not aggregating by value.netkit.classifiers.aggregators.AggregatorImp#AggregatorImp(String, String, netkit.graph.Attribute, netkit.graph.Type),
java.lang.Double.NaN
public AggregatorImp(java.lang.String aggName,
EdgeType edgeType,
Attribute attribute,
Type type)
aggName - The prefix name of this aggregated attribute. Normally the name of the aggregator (e.g., 'min' or 'max')edgeType - The name of the edge type to traverse to get at the neighboring nodesattribute - The attribute of the neighbor nodes to aggregate overtype - The attribute type of this aggregatornetkit.classifiers.aggregators.AggregatorImp#AggregatorImp(String, String, netkit.graph.Attribute, netkit.graph.Type, double)| Method Detail |
|---|
public final java.lang.String getName()
Aggregator
getName in interface Aggregatorprotected final int getAttributeIndex(java.lang.String nodeType)
nodeType - The type of the node through which we can access the attribute array information
public final Attribute getAttribute()
getAttribute in interface Aggregatorpublic final Type getType()
getType in interface Aggregatorpublic final EdgeType getEdgeType()
getEdgeType in interface Aggregatorprotected final SharedNodeInfo getNodeInfo(Node node)
node - The node whose cached aggregated information is needed.
public final double getValue(Node n)
getValue in interface Aggregatorn - The node around which to aggregate
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||