Title: Aggregation Query in Sensor Network with Sketches
Description: This code is for the simulation of sensor network with sketches algorithms. It applies with aggregation queries.
Copyright: Computer Science Department, Boston University,Copyright (c) 2003
Company: Boston University
Method Detail |
public Object combine(Sensor sensor, Object agg)
sensor
- The sensor whose reading is to be added to the aggregate objectagg
- The aggregation object (may be modified and returned)InvalidAggregateException
- if agg is not the appropriate aggregate typepublic Object combine(Object agg1, Object agg2)
agg1
- The first aggregate object (may be modified and returned)agg2
- The second aggregate objectInvalidAggregateException
- if agg1 or agg2 is not an appropriate aggregate typepublic Object emptyAgg(Sensor s)
s
- The sensor that produced the aggregate valuepublic int getValue(Object agg)
public Object getValueObj(Object agg)
public int getCount(Object agg)
public int numBytes(Object agg)
public void divide(Object agg, int divisor)
agg
- The aggregate to divide -- modified!InvalidAggregateException
- if unsupported, or if agg is not an appropriate aggregate type.public Object cloneAgg(Object agg)
public Object makeGuess()