Package algorithm.inhereitance

Source Code of algorithm.inhereitance.AveragingAggregator

package algorithm.inhereitance;

import static algorithm.MeasurementUtil.averageX;
import static algorithm.MeasurementUtil.averageY;

import java.util.Collection;

import algorithm.Measurement;

public class AveragingAggregator extends PointsAggregator {

  public AveragingAggregator(Collection<Measurement> measurements) {
    super(measurements);
  }

  @Override
  protected Collection<Measurement> filterMeasurements() {
    return measurements;
  }

  @Override
  protected Measurement aggregateMeasurements() {
    return new Measurement(averageX(measurements), averageY(measurements));

  }
}
TOP

Related Classes of algorithm.inhereitance.AveragingAggregator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.