insensa.infoconnections
Class CSpearmanRankCorrelation

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

public class CSpearmanRankCorrelation
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
           
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
           
static java.lang.String SPEARMAN_RANK_CORRELATION
           
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
CSpearmanRankCorrelation()
           
 
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()
           
private  float getGaussSum(int count)
           
 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()
           
private  java.util.Map<java.lang.Float,java.lang.Float> getRankMap(CCountValues countValues, int index, double[] stdDevValuesX, double[] meanValuesX)
           
 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)
           
 void solveDependencies(java.util.List<CRasterFileInformation> files, CRasterFileInformation templateFile)
           
 void write()
           
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

SPEARMAN_RANK_CORRELATION

public static final java.lang.String SPEARMAN_RANK_CORRELATION
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

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

CSpearmanRankCorrelation

public CSpearmanRankCorrelation()
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()

getGaussSum

private float getGaussSum(int count)
Parameters:
count -
Returns:

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:

getRankMap

private java.util.Map<java.lang.Float,java.lang.Float> getRankMap(CCountValues countValues,
                                                                  int index,
                                                                  double[] stdDevValuesX,
                                                                  double[] meanValuesX)
                                                           throws java.io.IOException
Parameters:
countValues -
index -
stdDevValuesX -
meanValuesX -
Returns:
Throws:
java.io.IOException

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

public 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()

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()