de.jstacs.data
Class DinucleotideProperty.MedianSmoothing

java.lang.Object
  extended by de.jstacs.data.DinucleotideProperty.Smoothing
      extended by de.jstacs.data.DinucleotideProperty.MedianSmoothing
Enclosing class:
DinucleotideProperty

public static class DinucleotideProperty.MedianSmoothing
extends DinucleotideProperty.Smoothing

Smoothing by median using a pre-defined window width.

Author:
Jan Grau

Constructor Summary
DinucleotideProperty.MedianSmoothing(int width)
          Creates a new DinucleotideProperty.MedianSmoothing that computes the median over windows of width width.
 
Method Summary
 double[] smooth(double[] original)
          Returns the smoothed version of original.
 String toString()
          Returns a String representation of this smoothing method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DinucleotideProperty.MedianSmoothing

public DinucleotideProperty.MedianSmoothing(int width)
Creates a new DinucleotideProperty.MedianSmoothing that computes the median over windows of width width.

Parameters:
width - the width of the window.
Method Detail

smooth

public double[] smooth(double[] original)
Description copied from class: DinucleotideProperty.Smoothing
Returns the smoothed version of original. The length of the returned array and original may differ.

Specified by:
smooth in class DinucleotideProperty.Smoothing
Parameters:
original - the original series of values
Returns:
the smoothed version

toString

public String toString()
Description copied from class: DinucleotideProperty.Smoothing
Returns a String representation of this smoothing method.

Specified by:
toString in class DinucleotideProperty.Smoothing