netkit.classifiers.aggregators
Interface Aggregator

All Known Subinterfaces:
AggregatorByValue
All Known Implementing Classes:
AggregatorByValueImp, AggregatorImp, Count, Exist, Max, Mean, Min, Mode, Ratio

public interface Aggregator

The Aggregator interface provides for dynamic attribute fields within Attributes containers. Aggregators may be added in a Graph on a specific node type and act like additional attribute fields within that node type. The value returned by an Aggregator may be static (fixed for the lifetime of the Aggregator-Node combination and therefore possibly cached) or dynamically calculated on each fetch. That is up to the implementor of the interface object. Within a Node, getting a named or indexed value first searches the fixed attributes then looks in the aggregators for a matching value to return. They attempt to behave just like any other attribute field.

Author:
Kaveh R. Ghazi
See Also:
Attribute, Attributes, Node

Method Summary
 Attribute getAttribute()
          Gets the attribute that is being aggregated over.
 EdgeType getEdgeType()
          Gets the edge that is used for aggregation.
 java.lang.String getName()
          Gets the name of the field represented by this object.
 Type getType()
          Gets the Type of the value stored in this object.
 double getValue(Node n)
          Gets the value stored in this object for the supplied Node.
 double getValue(Node n, Estimate prior)
          Gets the value stored in this object for the supplied Node.
 

Method Detail

getName

java.lang.String getName()
Gets the name of the field represented by this object.

Returns:
the name of the field represented by this object.

getType

Type getType()
Gets the Type of the value stored in this object.

Returns:
the Type of the value stored in this object.

getAttribute

Attribute getAttribute()
Gets the attribute that is being aggregated over.

Returns:
the Type of the value stored in this object.

getEdgeType

EdgeType getEdgeType()
Gets the edge that is used for aggregation.

Returns:
the edge that is used for aggregation.

getValue

double getValue(Node n)
Gets the value stored in this object for the supplied Node.

Parameters:
n - a Node for which to calculate and/or supply a value.
Returns:
the value stored in this object for the supplied Node.

getValue

double getValue(Node n,
                Estimate prior)
Gets the value stored in this object for the supplied Node.

Parameters:
n - a Node for which to calculate and/or supply a value.
prior - current priors for unknown neighbor values.
Returns:
the value stored in this object for the supplied Node.