R - C - public class DoubleMatrixDataset<R extends Comparable,C extends Comparable> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected LinkedHashMap<C,Integer> |
hashCols |
protected LinkedHashMap<R,Integer> |
hashRows |
protected cern.colt.matrix.tdouble.DoubleMatrix2D |
matrix |
| Constructor and Description |
|---|
DoubleMatrixDataset() |
DoubleMatrixDataset(cern.colt.matrix.tdouble.DoubleMatrix2D matrix,
LinkedHashMap<R,Integer> hashRows,
LinkedHashMap<C,Integer> hashCols) |
DoubleMatrixDataset(int rows,
int columns) |
DoubleMatrixDataset(LinkedHashMap<R,Integer> hashRows,
LinkedHashMap<C,Integer> hashCols) |
DoubleMatrixDataset(List<R> rowNames,
List<C> colNames) |
| Modifier and Type | Method and Description |
|---|---|
int |
columns() |
ArrayList<C> |
getColObjects() |
double |
getElement(int row,
int column)
Get specific element.
|
double |
getElement(R rowName,
C columnName)
Get specific element.
|
LinkedHashMap<C,Integer> |
getHashCols() |
LinkedHashMap<R,Integer> |
getHashRows() |
cern.colt.matrix.tdouble.DoubleMatrix2D |
getMatrix() |
ArrayList<R> |
getRowObjects() |
static DoubleMatrixDataset<String,String> |
loadDoubleData(String fileName) |
static DoubleMatrixDataset<String,String> |
loadDoubleTextData(String fileName,
String delimiter) |
static DoubleMatrixDataset<String,String> |
loadSubsetOfTextDoubleData(String fileName,
String delimiter,
HashSet<String> desiredRows,
HashSet<String> desiredCols) |
void |
OrderOnColumnnames()
Order columns
|
void |
OrderOnRownames()
Order rows
|
void |
reorderCols(LinkedHashMap<C,Integer> mappingIndex) |
void |
reorderRows(LinkedHashMap<R,Integer> mappingIndex) |
int |
rows() |
void |
save(File file) |
void |
save(String fileName) |
void |
saveDice(String fileName) |
void |
setColObjects(List<C> arrayList) |
void |
setElement(R rowName,
C columnName,
double value)
Set a element of the dataset.
|
void |
setHashCols(LinkedHashMap<C,Integer> hashCols) |
void |
setHashRows(LinkedHashMap<R,Integer> hashRows) |
void |
setMatrix(double[][] matrix) |
void |
setMatrix(cern.colt.matrix.tdouble.DoubleMatrix2D matrix) |
void |
setRowObjects(List<R> arrayList) |
DoubleMatrixDataset<C,R> |
viewDice() |
protected cern.colt.matrix.tdouble.DoubleMatrix2D matrix
protected LinkedHashMap<R extends Comparable,Integer> hashRows
protected LinkedHashMap<C extends Comparable,Integer> hashCols
public DoubleMatrixDataset()
public DoubleMatrixDataset(int rows,
int columns)
public DoubleMatrixDataset(LinkedHashMap<R,Integer> hashRows, LinkedHashMap<C,Integer> hashCols)
public DoubleMatrixDataset(cern.colt.matrix.tdouble.DoubleMatrix2D matrix,
LinkedHashMap<R,Integer> hashRows,
LinkedHashMap<C,Integer> hashCols)
public static DoubleMatrixDataset<String,String> loadDoubleData(String fileName) throws IOException
IOExceptionpublic static DoubleMatrixDataset<String,String> loadDoubleTextData(String fileName, String delimiter) throws IOException
IOExceptionpublic static DoubleMatrixDataset<String,String> loadSubsetOfTextDoubleData(String fileName, String delimiter, HashSet<String> desiredRows, HashSet<String> desiredCols) throws IOException
IOExceptionpublic void save(File file) throws IOException
IOExceptionpublic void save(String fileName) throws IOException
IOExceptionpublic void saveDice(String fileName) throws IOException
IOExceptionpublic int rows()
public int columns()
public LinkedHashMap<R,Integer> getHashRows()
public void setHashRows(LinkedHashMap<R,Integer> hashRows)
public LinkedHashMap<C,Integer> getHashCols()
public void setHashCols(LinkedHashMap<C,Integer> hashCols)
public cern.colt.matrix.tdouble.DoubleMatrix2D getMatrix()
public void setMatrix(cern.colt.matrix.tdouble.DoubleMatrix2D matrix)
public void setMatrix(double[][] matrix)
public void OrderOnColumnnames()
public void OrderOnRownames()
public void reorderRows(LinkedHashMap<R,Integer> mappingIndex)
public void reorderCols(LinkedHashMap<C,Integer> mappingIndex)
public DoubleMatrixDataset<C,R> viewDice()
public void setElement(R rowName, C columnName, double value)
rowName - columnName - value - public double getElement(R rowName, C columnName)
rowName - columnName - public double getElement(int row,
int column)
row - column - Copyright © 2015. All Rights Reserved.