netkit.classifiers.aggregators
Class AggregatorByValueImp
java.lang.Object
netkit.classifiers.aggregators.AggregatorImp
netkit.classifiers.aggregators.AggregatorByValueImp
- All Implemented Interfaces:
- Aggregator, AggregatorByValue
- Direct Known Subclasses:
- Count, Exist, Ratio
public abstract class AggregatorByValueImp
- extends AggregatorImp
- implements AggregatorByValue
This should be the parent class for any AggregatorByValue class.
It sets up the basic structure for an AggregatorByValue and defines most of the needed API.
The only thing needed to be implemented by any subclass is the getValue(Node, Estimate)
method.
- Author:
- Sofus A. Macskassy (sofmac@gmail.com)
Constructor Summary |
AggregatorByValueImp(java.lang.String aggName,
EdgeType edgeType,
Attribute attribute,
Type type,
double value)
Specifies the core parameters needed to instantiate an AggregatorByValue class. |
Method Summary |
double |
getAttributeValue()
Gets the value value that is being aggregated on (e.g., how
often did 'aquavit' appear would return the double value representing
'aquavit' in an AttributeCategorical) |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
attributeValue
protected final double attributeValue
AggregatorByValueImp
public AggregatorByValueImp(java.lang.String aggName,
EdgeType edgeType,
Attribute attribute,
Type type,
double value)
- Specifies the core parameters needed to instantiate an AggregatorByValue class. This calls
the standard aggregator constructor with all these parameters, which helps set the name and other
internal variables. The name of the 'virtual' attribute is set in the AggregatorImp constructor.
- Parameters:
aggName
- The prefix name of this aggregator attributeedgeType
- The name of the relation to follow to find neighbor nodes to aggregate overattribute
- The attribute of neighboring nodes that should be aggregated ontype
- The attribute type of this aggregatorvalue
- The value to aggregate on (e.g., the double representing 'aquavit')- See Also:
AggregatorImp
getAttributeValue
public final double getAttributeValue()
- Description copied from interface:
AggregatorByValue
- Gets the value value that is being aggregated on (e.g., how
often did 'aquavit' appear would return the double value representing
'aquavit' in an AttributeCategorical)
- Specified by:
getAttributeValue
in interface AggregatorByValue
- Returns:
- the value passed in as the 'value' in the Constructor
toString
public final java.lang.String toString()
- Overrides:
toString
in class AggregatorImp