|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.systemsbiology.cyni.CyniTable
public class CyniTable
| Field Summary | |
|---|---|
protected boolean |
anyMissing
|
protected Boolean[] |
colHasMissingValue
|
protected int[] |
colMaxValue
|
protected int[] |
colMinValue
|
protected int[] |
colNumStringsDiff
|
protected cern.colt.matrix.tobject.ObjectMatrix1D |
columnLabels
|
protected cern.colt.matrix.tdouble.DoubleMatrix1D |
colWeights
|
protected cern.colt.matrix.tobject.ObjectMatrix2D |
data
|
protected boolean |
ignoreMissing
|
protected Class<?>[] |
indexToTypes
|
protected org.cytoscape.model.CyTable |
internalTable
|
protected Map<Object,Integer> |
mapColLabels
|
protected Map<Object,Integer> |
mapRowLabels
|
protected Map<Integer,Integer> |
mapRowOrder
|
protected int |
nColumns
|
protected int |
nRows
|
protected Boolean[] |
rowHasMissingValue
|
protected cern.colt.matrix.tobject.ObjectMatrix1D |
rowLabels
|
protected int[] |
rowMaxValue
|
protected int[] |
rowMinValue
|
protected int[] |
rowNumStringsDiff
|
protected cern.colt.matrix.tdouble.DoubleMatrix1D |
rowWeights
|
protected boolean |
selectedOnly
|
protected ArrayList<String> |
stringValues
|
protected boolean |
transpose
|
| Constructor Summary | |
|---|---|
CyniTable(CyniTable duplicate)
Create a cyni table from an existing one. |
|
CyniTable(org.cytoscape.model.CyTable table,
String[] attributes,
boolean transpose,
boolean ignoreMissing,
boolean selectedOnly)
Create a Cyni table from the current selected table. |
|
CyniTable(int rows,
int cols)
Create an empty Cyni Table with the specified number of columns and rows. |
|
| Method Summary | |
|---|---|
void |
changeOrderRowsByColumnValuesOrder(List<Object> colValues)
Changes the order of the rows according to the values of a selected column The method supposes that the first value of the input list corresponds to the first element of the column and so on. |
void |
changeOrderRowsToRandom()
Changes the order of the rows in the table randomly |
boolean |
columnHasMissingValue(int column)
Tells if the specified column has a missing value. |
double |
doubleValue(int row,
int column)
Returns the double value for the specified row and column combination |
ArrayList<String> |
getAttributeStringValues()
Returns the list of all possible strings values in the table |
Integer |
getColIndex(Object label)
Returns the index column for the specified label. |
Object |
getColLabel(int col)
Returns the label for the specified column. |
Object[] |
getColLabels()
Returns the array with all column labels. |
double |
getColWeight(int col)
Returns the weight for the specified column. |
double[] |
getColWeights()
Returns the array of weights for the columns. |
int |
getNumPossibleStrings(int index,
boolean inRow)
Returns the number of possible/different strings stored in the defined column or row |
double[] |
getRank(int row)
Returns an array with a number for each position representing the rank of the value in the whole row |
Integer |
getRowIndex(Object label)
Returns the index row for the specified label. |
Object |
getRowLabel(int row)
Returns the label for the specified row. |
Object[] |
getRowLabels()
Returns the array with all row labels. |
double |
getRowWeight(int row)
Returns the weight for the specified row. |
double[] |
getRowWeights()
Returns the array of weights for the rows. |
Class<?> |
getType(int row,
int column)
Returns the type of for the specified row and column combination. |
Object |
getValue(int row,
int column)
Returns the value for the specified row and column |
boolean |
hasAnyMissingValue()
Returns if the table has any missing value |
boolean |
hasValue(int row,
int column)
Returns if the content of the table for the specified row and column combination has a real value. |
int |
integerValue(int row,
int column)
Returns the integer value for the specified row and column combination. |
boolean |
isMatching(int row,
int col,
Object value)
Checks whether the element in position defined by row and col parameters matches the given value. |
boolean |
isTransposed()
Returns if the table is transposed |
int |
nColumns()
Returns the number of columns in the table. |
int |
nRows()
Returns the number of rows in the table. |
void |
resetOrderRows()
Changes the order to the initial internal state |
boolean |
rowHasMissingValue(int row)
Tells if the specified row has a missing value. |
void |
setColLabel(int col,
Object label)
Set the label for the specified column. |
void |
setColWeight(int col,
double value)
Set the weight for the specified column. |
void |
setRowLabel(int row,
Object label)
Set the label for the specified row. |
void |
setRowWeight(int row,
double value)
Set the weight for the specified row. |
void |
setType(int row,
int column,
Class<?> type)
Allows setting the type of for the specified row and column combination. |
void |
setUniformWeights()
Set the weights to a constant value. |
void |
setValue(int row,
int column,
Object value)
Set the value for the specified row and column |
String |
stringValue(int row,
int column)
Returns the string value for the specified row and column combination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int nRows
protected int nColumns
protected cern.colt.matrix.tobject.ObjectMatrix2D data
protected org.cytoscape.model.CyTable internalTable
protected cern.colt.matrix.tdouble.DoubleMatrix1D colWeights
protected cern.colt.matrix.tdouble.DoubleMatrix1D rowWeights
protected cern.colt.matrix.tobject.ObjectMatrix1D rowLabels
protected cern.colt.matrix.tobject.ObjectMatrix1D columnLabels
protected boolean transpose
protected boolean anyMissing
protected boolean ignoreMissing
protected boolean selectedOnly
protected Class<?>[] indexToTypes
protected ArrayList<String> stringValues
protected Boolean[] colHasMissingValue
protected Boolean[] rowHasMissingValue
protected Map<Object,Integer> mapRowLabels
protected Map<Object,Integer> mapColLabels
protected Map<Integer,Integer> mapRowOrder
protected int[] colNumStringsDiff
protected int[] rowNumStringsDiff
protected int[] colMaxValue
protected int[] colMinValue
protected int[] rowMaxValue
protected int[] rowMinValue
| Constructor Detail |
|---|
public CyniTable(org.cytoscape.model.CyTable table,
String[] attributes,
boolean transpose,
boolean ignoreMissing,
boolean selectedOnly)
attribute - name of the columns to storetable - CyTabletranspose - true if we are transposing this tableignoreMissing - true if the new table will not have any row with missing valuesselectedOnly - true if the new table will only contains rows that correspond to selected nodespublic CyniTable(CyniTable duplicate)
duplicate - The cyni table to duplicate
public CyniTable(int rows,
int cols)
rows - number of rowscols - number of cols| Method Detail |
|---|
public boolean isTransposed()
public boolean hasAnyMissingValue()
public int nRows()
public int nColumns()
public Object getValue(int row,
int column)
row - The number of the row.column - The number of the column.
public void setValue(int row,
int column,
Object value)
row - The number of the row.column - The number of the column.value - The value for the column and rowpublic ArrayList<String> getAttributeStringValues()
public double doubleValue(int row,
int column)
row - The number of the row.column - The number of the column.
public int integerValue(int row,
int column)
row - The number of the row.column - The number of the column.
public String stringValue(int row,
int column)
row - The number of the row.column - The number of the column.
public boolean hasValue(int row,
int column)
row - The number of the row.column - The number of the column.
public boolean rowHasMissingValue(int row)
row - The number of the row.
public boolean columnHasMissingValue(int column)
column - The number of the column.
public Class<?> getType(int row,
int column)
row - The number of the row.column - The number of the column.
public void setType(int row,
int column,
Class<?> type)
row - The number of the row.column - The number of the column.type - The type of that table content
public int getNumPossibleStrings(int index,
boolean inRow)
index - The index of the row or column.inRow - True if the index corresponds to a row index, false if it is for a column
public void setUniformWeights()
public double[] getRowWeights()
public double getRowWeight(int row)
row - The number of the row.
public double[] getColWeights()
public double getColWeight(int col)
col - The number of the column.
public void setRowWeight(int row,
double value)
row - The number of the row.value - The weight
public void setColWeight(int col,
double value)
col - The number of the column.value - The weightpublic Object[] getColLabels()
public Object getColLabel(int col)
col - The number of the column.
public void setColLabel(int col,
Object label)
col - The number of the column.label - The label.public Integer getColIndex(Object label)
label - The label object.
public Object[] getRowLabels()
public Object getRowLabel(int row)
row - The number of the row.
public Integer getRowIndex(Object label)
label - The label object.
public void setRowLabel(int row,
Object label)
row - The number of the row.label - The label.
public boolean isMatching(int row,
int col,
Object value)
row - The row index.col - The col index.value - The object value to check.
public void changeOrderRowsToRandom()
public void resetOrderRows()
public void changeOrderRowsByColumnValuesOrder(List<Object> colValues)
colValues - The list of values for the selected columnpublic double[] getRank(int row)
row - The number of the row.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||