com.steema.teechart.functions
Class DownSampling

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.functions.Function
          extended by com.steema.teechart.functions.DownSampling
All Implemented Interfaces:
java.io.Serializable

public class DownSampling
extends Function

Title: DownSampling class

Description: Reduces the number of points in series by using several different methods.

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.steema.teechart.functions.Function
canUsePeriod, dPeriod, HideSourceList, noSourceRequired, series, SingleSource, updating
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
DownSampling()
           
DownSampling(IBaseChart c)
           
 
Method Summary
 void addPoints(java.util.ArrayList source)
          Gets all points from Source series, performs a function operation on points and stores results in ParentSeries.
 java.lang.String getDescription()
          Gets descriptive text.
 DownSamplingMethod getMethod()
          Defines reduction/downsampling method.
 int getReducedSize()
          Returns reduced size
 double getTolerance()
          The tolerance for downsampling method.
All points within Tolerance will be replaced with one or two points.
 com.steema.teechart.functions.DownSampling.ReduceResults reduce(DownSamplingMethod algorithm, double tol, int lbound, int ubound, double[] x, double[] y)
          Reduce the number of points in double arrays
 void setMethod(DownSamplingMethod value)
          Defines reduction/downsampling method.
 void setTolerance(double value)
          Sets the tolerance for downsampling method.
All points within Tolerance will be replaced with one or two points.
 
Methods inherited from class com.steema.teechart.functions.Function
addFunctionXY, calculate, calculateAllPoints, calculateByPeriod, calculateMany, calculatePeriod, clear, doCalculation, getPeriod, getPeriodAlign, getPeriodStyle, getSeries, newInstance, readResolve, recalculate, setPeriod, setPeriodAlign, setPeriodStyle, setSeries, valueList
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownSampling

public DownSampling()

DownSampling

public DownSampling(IBaseChart c)
Method Detail

reduce

public com.steema.teechart.functions.DownSampling.ReduceResults reduce(DownSamplingMethod algorithm,
                                                                       double tol,
                                                                       int lbound,
                                                                       int ubound,
                                                                       double[] x,
                                                                       double[] y)
Reduce the number of points in double arrays

Parameters:
algorithm - DownSamplingMethod reduction algorithm
tol - double desired tolerance
lbound - int lower bound for x,y arrays
ubound - int upper bound for x,y arrays
x - double[] x array
y - double[] y array
Returns:
ReduceResults reduced array size

getReducedSize

public int getReducedSize()
Returns reduced size

Returns:
int

getTolerance

public double getTolerance()
The tolerance for downsampling method.
All points within Tolerance will be replaced with one or two points.

Returns:
double

setTolerance

public void setTolerance(double value)
Sets the tolerance for downsampling method.
All points within Tolerance will be replaced with one or two points.

Parameters:
value - double

getMethod

public DownSamplingMethod getMethod()
Defines reduction/downsampling method.

Returns:
DownSamplingMethod

setMethod

public void setMethod(DownSamplingMethod value)
Defines reduction/downsampling method.

Parameters:
value - DownSamplingMethod

addPoints

public void addPoints(java.util.ArrayList source)
Gets all points from Source series, performs a function operation on points and stores results in ParentSeries.

Overrides:
addPoints in class Function
Parameters:
source - ArrayList

getDescription

public java.lang.String getDescription()
Gets descriptive text.

Overrides:
getDescription in class Function
Returns:
String