Simulation Core Library

org.simulator.math
Class PearsonCorrelation

java.lang.Object
  extended by org.simulator.math.QualityMeasure
      extended by org.simulator.math.PearsonCorrelation
All Implemented Interfaces:
Serializable

public class PearsonCorrelation
extends QualityMeasure

Implementation of the Pearson correlation.

Since:
1.0
Version:
$Rev: 454 $
Author:
Roland Keller
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.simulator.math.QualityMeasure
defaultValue, meanFunction
 
Constructor Summary
PearsonCorrelation()
          Default constructor.
PearsonCorrelation(double defaultValue)
          Constructor, which allows setting the parameter value for default value.
 
Method Summary
 double distance(MultiTable.Block.Column x, MultiTable.Block.Column y, double defaultValue)
          Returns the distance of the two vectors x and y with the given root.
 
Methods inherited from class org.simulator.math.QualityMeasure
distance, distance, getColumnDistances, getDefaultValue, getMeanFunction, setDefaultValue, setMeanFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PearsonCorrelation

public PearsonCorrelation()
Default constructor. This sets the standard value for the parameter as given by the getStandardParameter() method. The default value is set to NaN.


PearsonCorrelation

public PearsonCorrelation(double defaultValue)
Constructor, which allows setting the parameter value for default value.

Parameters:
defaultValue - the default value
Method Detail

distance

public double distance(MultiTable.Block.Column x,
                       MultiTable.Block.Column y,
                       double defaultValue)
Description copied from class: QualityMeasure
Returns the distance of the two vectors x and y with the given root. This may be the root in a formal way or a default value to be returned if the distance uses a non defined operation. If one array is longer than the other one additional values do not contribute to the distance. Double.NaN values are also ignored.

Specified by:
distance in class QualityMeasure
Parameters:
x - an array
y - another array
defaultValue - The value to be returned in cases in which no distance computation is possible.
Returns:
The distance between the two arrays x and y.

Generated at March 17 2014
Version 1.4 Revision 453