data
Class Matrix

java.lang.Object
  extended by data.Matrix
All Implemented Interfaces:
java.io.Serializable

public class Matrix
extends java.lang.Object
implements java.io.Serializable

Data structure to handle probability matrix. Each test or taxa has a implicit key or index based on his position in the array. This key or index is used in all project code (not only this class). There's is no need to know the index for a concrete item, because reverse search is never used. The usual thing is iterate for all items that satisfy a condition. That could be easy done with a "for" loop and there's no need to create Iterators.

Version:
1.0
Author:
Oscar Flores
See Also:
Serialized Form

Field Summary
 java.util.Date importDate
          Timestamp of the import moment
 java.lang.String info
          General Text info about matrix entered by user
static float MISS_VALUE
          Float value to mark a value as missed
 java.lang.String name
          Matrix name (id of the Matrix)
 float[][] prob_test_taxa
          Matrix[x][y] with the probability (normalized from 0 to 1 about taxa "y" gives a positive on test "x"
(package private) static long serialVersionUID
           
 java.lang.String[] taxa_names
          Names of the taxa on the matrix
static int TEST_MISS
          Test missed
 java.lang.String[] test_names
          Names of the tests on the matrix
static int TEST_NEG
          Test done with negative value
static int TEST_POS
          Test done with possitive result
 
Constructor Summary
Matrix()
           
 
Method Summary
 int taxaN()
          Returns the number of taxas in the matrix
 void testIntegrity()
          Permorms an integrity check on the matrix and look for incoherences or redundant values NOTE: Until this moment I have not found any specific integrity violation to worry about.
 int testN()
          Returns the number of tests in the Matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

MISS_VALUE

public static final float MISS_VALUE
Float value to mark a value as missed

See Also:
Constant Field Values

TEST_MISS

public static final int TEST_MISS
Test missed

See Also:
Constant Field Values

TEST_POS

public static final int TEST_POS
Test done with possitive result

See Also:
Constant Field Values

TEST_NEG

public static final int TEST_NEG
Test done with negative value

See Also:
Constant Field Values

name

public java.lang.String name
Matrix name (id of the Matrix)


info

public java.lang.String info
General Text info about matrix entered by user


test_names

public java.lang.String[] test_names
Names of the tests on the matrix


taxa_names

public java.lang.String[] taxa_names
Names of the taxa on the matrix


importDate

public java.util.Date importDate
Timestamp of the import moment


prob_test_taxa

public float[][] prob_test_taxa
Matrix[x][y] with the probability (normalized from 0 to 1 about taxa "y" gives a positive on test "x"

Constructor Detail

Matrix

public Matrix()
Method Detail

testN

public int testN()
Returns the number of tests in the Matrix


taxaN

public int taxaN()
Returns the number of taxas in the matrix


testIntegrity

public void testIntegrity()
Permorms an integrity check on the matrix and look for incoherences or redundant values NOTE: Until this moment I have not found any specific integrity violation to worry about. Various checks can be performed (redundant or repeated tests or taxa pairs, zero filled columns or rows...) but they are expensive in a computational way and we could pass this responsability to matrix creator. I leaave the function call just for if it's needed in a future