Style Intelligence v12.0

inetsoft.report.filter
Class CovarianceFormula

java.lang.Object
  extended by inetsoft.report.filter.CovarianceFormula
All Implemented Interfaces:
Formula, Formula2, Serializable, Cloneable

public class CovarianceFormula
extends Object
implements Formula2, Serializable

Calculate the covariance of two columns.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface inetsoft.report.filter.Formula
__NULL__
 
Constructor Summary
CovarianceFormula()
          Constructor.
CovarianceFormula(int col)
          Create a covariance formula.
 
Method Summary
 void addValue(double v)
          Add a double value to the formula.
 void addValue(double[] v)
          Add double value to the formula.
 void addValue(float v)
          Add a float value to the formula.
 void addValue(int v)
          Add an int value to the formula.
 void addValue(long v)
          Add a long value to the formula.
 void addValue(Object v)
          Add a value to the formula.
 void addValue(short v)
          Add a short value to the formula.
 Object clone()
          Clone this formula.
 String getDisplayName()
          Get formula display name.
 double getDoubleResult()
          Get the formula double result.
 String getName()
          Get formula name.
 Object getResult()
          Get the formula result.
 int[] getSecondaryColumns()
          Get the second column index.
 boolean isDefaultResult()
          Get the default result option of this formula.
 void reset()
          Reset the formula to start over.
 void setDefaultResult(boolean def)
          Set the default result option of this formula.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CovarianceFormula

public CovarianceFormula()
Constructor.


CovarianceFormula

public CovarianceFormula(int col)
Create a covariance formula.

Parameters:
col - column number of the column to calculate covariance with.
Method Detail

getSecondaryColumns

public int[] getSecondaryColumns()
Get the second column index. The value on the primary column and the value on the second column are passed in as an object array with two elements.

Specified by:
getSecondaryColumns in interface Formula2

reset

public void reset()
Reset the formula to start over.

Specified by:
reset in interface Formula

addValue

public void addValue(double v)
Add a double value to the formula.

Specified by:
addValue in interface Formula

addValue

public void addValue(double[] v)
Add double value to the formula.

Specified by:
addValue in interface Formula

addValue

public void addValue(float v)
Add a float value to the formula.

Specified by:
addValue in interface Formula

addValue

public void addValue(long v)
Add a long value to the formula.

Specified by:
addValue in interface Formula

addValue

public void addValue(int v)
Add an int value to the formula.

Specified by:
addValue in interface Formula

addValue

public void addValue(short v)
Add a short value to the formula.

Specified by:
addValue in interface Formula

addValue

public void addValue(Object v)
Add a value to the formula.

Specified by:
addValue in interface Formula

setDefaultResult

public void setDefaultResult(boolean def)
Set the default result option of this formula.

Specified by:
setDefaultResult in interface Formula
Parameters:
def - true to use the default value of a formula if no result, false to just return null.

isDefaultResult

public boolean isDefaultResult()
Get the default result option of this formula.

Specified by:
isDefaultResult in interface Formula
Returns:
true to use the default value of a formula if no result, false to just return null.

getResult

public Object getResult()
Get the formula result.

Specified by:
getResult in interface Formula

getDoubleResult

public double getDoubleResult()
Get the formula double result.

Specified by:
getDoubleResult in interface Formula

clone

public Object clone()
Description copied from interface: Formula
Clone this formula. This may or may not copy the values from this formula.

Specified by:
clone in interface Formula
Overrides:
clone in class Object

getDisplayName

public String getDisplayName()
Get formula display name.

Specified by:
getDisplayName in interface Formula

getName

public String getName()
Get formula name.

Specified by:
getName in interface Formula

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.