org.knime.base.data.aggregation.numerical
Class MedianOperator

java.lang.Object
  extended by org.knime.base.data.aggregation.AggregationOperator
      extended by org.knime.base.data.aggregation.general.ListCellOperator
          extended by org.knime.base.data.aggregation.general.SortedListCellOperator
              extended by org.knime.base.data.aggregation.numerical.MedianOperator
All Implemented Interfaces:
Comparable<AggregationMethod>, AggregationMethod

public class MedianOperator
extends SortedListCellOperator

Computes the median of a list of numbers.

Author:
Tobias Koetter, University of Konstanz

Constructor Summary
  MedianOperator(GlobalSettings globalSettings, OperatorColumnSettings opColSettings)
          Constructor for class MedianOperator.
protected MedianOperator(OperatorData operatorData, GlobalSettings globalSettings, OperatorColumnSettings opColSettings)
          Constructor for class MedianOperator.
 
Method Summary
 AggregationOperator createInstance(GlobalSettings globalSettings, OperatorColumnSettings opColSettings)
          Creates a new instance of this operator.
protected  DataType getDataType(DataType origType)
          
 String getDescription()
          
protected  DataCell getResultInternal()
          
 
Methods inherited from class org.knime.base.data.aggregation.general.SortedListCellOperator
sortCells
 
Methods inherited from class org.knime.base.data.aggregation.general.ListCellOperator
computeInternal, getCells, resetInternal
 
Methods inherited from class org.knime.base.data.aggregation.AggregationOperator
compareTo, compute, createColumnSpec, createOperator, getColumnLabel, getGlobalSettings, getId, getLabel, getMaxUniqueValues, getOperatorData, getResult, getSkipMessage, getSupportedType, getSupportedTypeLabel, getValueDelimiter, inclMissingCells, isCompatible, isCompatible, isSkipped, isUsesLimit, keepColumnSpec, reset, setSkipMessage, setSkipped, supportsMissingValueOption, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MedianOperator

protected MedianOperator(OperatorData operatorData,
                         GlobalSettings globalSettings,
                         OperatorColumnSettings opColSettings)
Constructor for class MedianOperator.

Parameters:
operatorData - the operator data
globalSettings - the global settings
opColSettings - the operator column specific settings

MedianOperator

public MedianOperator(GlobalSettings globalSettings,
                      OperatorColumnSettings opColSettings)
Constructor for class MedianOperator.

Parameters:
globalSettings - the global settings
opColSettings - the operator column specific settings
Method Detail

getDataType

protected DataType getDataType(DataType origType)

Overrides:
getDataType in class ListCellOperator
Parameters:
origType - the DataType of the original column to aggregate
Returns:
the DataType of the aggregation result

createInstance

public AggregationOperator createInstance(GlobalSettings globalSettings,
                                          OperatorColumnSettings opColSettings)
Creates a new instance of this operator. A new instance is created for each column.

Overrides:
createInstance in class SortedListCellOperator
Parameters:
globalSettings - the global settings
opColSettings - the operator column specific settings
Returns:
a new instance of this operator

getResultInternal

protected DataCell getResultInternal()

Overrides:
getResultInternal in class SortedListCellOperator
Returns:
the result DataCell

getDescription

public String getDescription()

Specified by:
getDescription in interface AggregationMethod
Overrides:
getDescription in class SortedListCellOperator
Returns:
a description that explains the used aggregation method to the user


Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.