com.steema.teechart.functions
Class RootMeanSquare

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

public class RootMeanSquare
extends Function

Title: RootMeanSquare class

Description: Root Mean Square Function.

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
RootMeanSquare()
           
RootMeanSquare(IBaseChart c)
           
 
Method Summary
 double calculate(Series s, int firstIndex, int lastIndex)
          Performs function operation on SourceSeries series.
First and Last parameters are ValueIndex of first and last point used in calculation.
 double calculateMany(java.util.ArrayList sourceSeries, int valueIndex)
          Performs function operation on list of series (SourceSeriesList).
The ValueIndex parameter defines ValueIndex of point in each Series in list.
 boolean getComplete()
          Defines the RMS formula.
 java.lang.String getDescription()
          Gets descriptive text.
 void setComplete(boolean value)
          Defines the RMS formula.
 
Methods inherited from class com.steema.teechart.functions.Function
addFunctionXY, addPoints, calculateAllPoints, calculateByPeriod, 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

RootMeanSquare

public RootMeanSquare()

RootMeanSquare

public RootMeanSquare(IBaseChart c)
Method Detail

getComplete

public boolean getComplete()
Defines the RMS formula.

RMS = Sqrt(Sum(Sqr(x[i]))/NumPoints) ... Complete = true
RMS = Sqrt(Sum(Sqr(x[i]))/(NumPoints-1)) ... Complete = false
Default value: false

Returns:
boolean

setComplete

public void setComplete(boolean value)
Defines the RMS formula.

Default value: false

Parameters:
value - boolean
See Also:
getComplete()

calculate

public double calculate(Series s,
                        int firstIndex,
                        int lastIndex)
Performs function operation on SourceSeries series.
First and Last parameters are ValueIndex of first and last point used in calculation.
You can override Calculate function to perform customized calculation on one SourceSeries.

Overrides:
calculate in class Function
Parameters:
s - Series
firstIndex - int
lastIndex - int
Returns:
double

calculateMany

public double calculateMany(java.util.ArrayList sourceSeries,
                            int valueIndex)
Performs function operation on list of series (SourceSeriesList).
The ValueIndex parameter defines ValueIndex of point in each Series in list.
You can override CalculateMany function to perform customized calculation on list of SourceSeries.

Overrides:
calculateMany in class Function
Parameters:
sourceSeries - ArrayList
valueIndex - int
Returns:
double

getDescription

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

Overrides:
getDescription in class Function
Returns:
String