Package algorithm.composition

Source Code of algorithm.composition.AveragingStrategy

package algorithm.composition;

import java.util.Collection;

import algorithm.Measurement;
import algorithm.MeasurementUtil;

public class AveragingStrategy implements IAggregationStrategy {

  @Override
  public Measurement aggregate(Collection<Measurement> measurements) {
    return new Measurement(MeasurementUtil.averageX(measurements), MeasurementUtil.averageY(measurements));
  }

}
TOP

Related Classes of algorithm.composition.AveragingStrategy

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.