001 /*--------------------------------------------------------------------------+
002 $Id: EAggregationStrategy.java 27961 2010-05-28 11:26:40Z deissenb $
003 | |
004 | Copyright 2005-2010 Technische Universitaet Muenchen |
005 | |
006 | Licensed under the Apache License, Version 2.0 (the "License"); |
007 | you may not use this file except in compliance with the License. |
008 | You may obtain a copy of the License at |
009 | |
010 | http://www.apache.org/licenses/LICENSE-2.0 |
011 | |
012 | Unless required by applicable law or agreed to in writing, software |
013 | distributed under the License is distributed on an "AS IS" BASIS, |
014 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
015 | See the License for the specific language governing permissions and |
016 | limitations under the License. |
017 +--------------------------------------------------------------------------*/
018 package edu.tum.cs.commons.math;
019
020 /**
021 * Enumeration for different aggregation strategies.
022 *
023 * @author deissenb
024 * @author $Author: deissenb $
025 * @version $Rev: 27961 $
026 * @levd.rating GREEN Hash: C8D121A18760092443B22D4224237E46
027 */
028 public enum EAggregationStrategy {
029 /** Sum aggregation, see {@link SumAggregator}. */
030 SUM(new SumAggregator()),
031
032 /** Maximum aggregation, see {@link MaxAggregator}. */
033 MAX(new MaxAggregator()),
034
035 /** Minimum aggregation, see {@link MinAggregator}. */
036 MIN(new MinAggregator()),
037
038 /** Mean aggregation, see {@link MeanAggregator}. */
039 MEAN(new MeanAggregator()),
040
041 /** Median aggregation, see {@link MedianAggregator}. */
042 MEDIAN(new MedianAggregator());
043
044 /** The aggregator used fro this strategy. */
045 private final IAggregator aggregator;
046
047 /** Create strategy. */
048 private EAggregationStrategy(IAggregator aggregator) {
049 this.aggregator = aggregator;
050 }
051
052 /** Get aggregator. */
053 public IAggregator getAggregator() {
054 return aggregator;
055 }
056 }