insensa.infoconnections
Class PearsonCorrelation

java.lang.Object
  extended by insensa.connections.AbstractConnection
      extended by insensa.infoconnections.PearsonCorrelation
All Implemented Interfaces:
ConnectionFileChanger, FileObserver, InfoConnection, java.lang.Runnable

public class PearsonCorrelation
extends AbstractConnection
implements InfoConnection


Field Summary
private static java.lang.String CONSTANT
           
private  int countCalc
           
private  java.util.List<java.util.List<java.lang.Object>> coVarList
           
private  int index
           
static int MEAN_INITIATION
           
private static java.lang.String meanX
           
private static java.lang.String meanY
           
static int NODATA_SKIP
           
private  int option
           
private static java.lang.String P_VALUE
           
private  boolean partial
           
private static java.lang.String PARTIAL_COR
           
private  java.util.List<java.util.List<java.lang.Object>> partialList
           
private static java.lang.String stdDevX
           
private static java.lang.String stdDevY
           
private  boolean t_test
           
private static java.lang.String T_TEST
           
static int ZERO_INITIATION
           
 
Fields inherited from class insensa.connections.AbstractConnection
E_OUTPUT_NAME, E_OUTPUT_PATH, fileNameList, id, ID, OUTPUT_NAME, OUTPUT_SET, outputFile, outputFileName, outputFileSet, rasterFileList, separator, used, USED, workerStatus, XML_ELEMENT_FILE
 
Constructor Summary
PearsonCorrelation()
           
 
Method Summary
private  java.lang.Float findCorrelationValue(int index1, int index2)
           
 org.jdom.Element getConnectionElement()
          Build a xml Element with the attributes id used fileset name output file name source files full name (absolute) output name output path (relative) .
 java.lang.String getConnectionName()
           
 java.util.List<java.util.List<java.lang.Object>> getCoVarList()
          A List of coVar1(String:index1,String:index2,covariance,correlation).
 AttributeTable getData()
           
 java.util.List<java.lang.String> getInfoDependencies()
           
 int getOption()
           
 java.lang.String getOptionName()
           
 boolean getPartial()
           
 java.util.List<java.util.List<java.lang.Object>> getPartialList()
           
 boolean getT_test()
           
 void setConnectionElement(org.jdom.Element eCon)
          WARNING:
In case that this Connection is unused, you have to set the sourceFileList before invoking this function

.
 void setOption(int option)
           
 void setPartial(boolean partial)
           
 void setT_test(boolean t_test)
           
private  void solveDependencies(java.util.List<CRasterFileInformation> files, CRasterFileInformation templateFile)
           
 void write()
           
private  void writeFile(CRasterFileInformation fileX, java.util.List<CRasterFileInformation> files)
           
private  void writeFitFile(CRasterFileInformation fileX, java.util.List<CRasterFileInformation> files)
           
private  void writePartialCorrelation2()
           
 
Methods inherited from class insensa.connections.AbstractConnection
addAttributeValue, addElement, check, getChildElement, getFileNameList, getId, getOutputFile, getOutputFileName, getOutputFileSet, getRasterFileList, getSouceFileRelativePaths, getSourceFileList, getVariableList, isUsed, notifyDelete, run, setId, setOutputFile, setOutputFileName, setOutputFileSet, setSourceFileList, setUsed, setVariableList, setWorkerStatus, solveDependencies, solveDependencies, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

NODATA_SKIP

public static final int NODATA_SKIP
See Also:
Constant Field Values

MEAN_INITIATION

public static final int MEAN_INITIATION
See Also:
Constant Field Values

ZERO_INITIATION

public static final int ZERO_INITIATION
See Also:
Constant Field Values

coVarList

private java.util.List<java.util.List<java.lang.Object>> coVarList

partialList

private java.util.List<java.util.List<java.lang.Object>> partialList

stdDevX

private static final java.lang.String stdDevX
See Also:
Constant Field Values

stdDevY

private static final java.lang.String stdDevY
See Also:
Constant Field Values

meanX

private static final java.lang.String meanX
See Also:
Constant Field Values

meanY

private static final java.lang.String meanY
See Also:
Constant Field Values

PARTIAL_COR

private static final java.lang.String PARTIAL_COR
See Also:
Constant Field Values

CONSTANT

private static final java.lang.String CONSTANT
See Also:
Constant Field Values

T_TEST

private static final java.lang.String T_TEST
See Also:
Constant Field Values

P_VALUE

private static final java.lang.String P_VALUE
See Also:
Constant Field Values

option

private int option

countCalc

private int countCalc

index

private int index

partial

private boolean partial

t_test

private boolean t_test
Constructor Detail

PearsonCorrelation

public PearsonCorrelation()
Method Detail

findCorrelationValue

private java.lang.Float findCorrelationValue(int index1,
                                             int index2)
Parameters:
index1 -
index2 -
Returns:

getConnectionElement

public org.jdom.Element getConnectionElement()
Description copied from class: AbstractConnection
Build a xml Element with the attributes

getConnectionName

public java.lang.String getConnectionName()
Specified by:
getConnectionName in interface ConnectionFileChanger
Returns:
See Also:
ConnectionFileChanger.getConnectionName()

getCoVarList

public java.util.List<java.util.List<java.lang.Object>> getCoVarList()
A List of coVar1(String:index1,String:index2,covariance,correlation).

Returns:

getData

public AttributeTable getData()
Specified by:
getData in interface ConnectionFileChanger
Overrides:
getData in class AbstractConnection
Returns:
See Also:
AbstractConnection.getData()

getInfoDependencies

public java.util.List<java.lang.String> getInfoDependencies()
Specified by:
getInfoDependencies in interface ConnectionFileChanger
Overrides:
getInfoDependencies in class AbstractConnection
Returns:
See Also:
AbstractConnection.getInfoDependencies()

getOption

public int getOption()
Returns:

getOptionName

public java.lang.String getOptionName()
Returns:

getPartial

public boolean getPartial()
Returns:

getPartialList

public java.util.List<java.util.List<java.lang.Object>> getPartialList()
Returns:

getT_test

public boolean getT_test()
Returns:

setConnectionElement

public void setConnectionElement(org.jdom.Element eCon)
                          throws java.io.IOException
Description copied from class: AbstractConnection
WARNING:
In case that this Connection is unused, you have to set the sourceFileList before invoking this function

.

Specified by:
setConnectionElement in interface ConnectionFileChanger
Overrides:
setConnectionElement in class AbstractConnection
Throws:
java.io.IOException
See Also:
AbstractConnection.setConnectionElement(org.jdom.Element)

setOption

public void setOption(int option)
Parameters:
option -

setPartial

public void setPartial(boolean partial)
Parameters:
partial -

setT_test

public void setT_test(boolean t_test)
Parameters:
t_test -

solveDependencies

private void solveDependencies(java.util.List<CRasterFileInformation> files,
                               CRasterFileInformation templateFile)
                        throws java.io.IOException
Parameters:
files -
templateFile -
Throws:
java.io.IOException

write

public void write()
           throws java.io.IOException,
                  org.jdom.JDOMException,
                  CRasterFileException
Specified by:
write in interface ConnectionFileChanger
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException
See Also:
ConnectionFileChanger.write()

writeFile

private void writeFile(CRasterFileInformation fileX,
                       java.util.List<CRasterFileInformation> files)
                throws java.io.IOException
Parameters:
fileX -
files -
Throws:
java.io.IOException

writeFitFile

private void writeFitFile(CRasterFileInformation fileX,
                          java.util.List<CRasterFileInformation> files)
                   throws java.io.IOException
Parameters:
fileX -
files -
Throws:
java.io.IOException

writePartialCorrelation2

private void writePartialCorrelation2()