public class DoubleSuperSparseMatrix extends AbstractSuperSparseMatrix implements DoubleSparseMatrix
Super sparse matrix for double data type
Copyright: Copyright (c) 2005
Company: IST, Drexel University
arrCachedRow, arrRowLoadFactor, arrRowPosInCache, arrRowPosInFile, arrRowStart, cacheMatrix, cacheSize, firstEmpty, flushInterval, indexFilename, matrix, matrixFactory, matrixFilename, totalCellisFinalized, mergeMode, miniModecellDataLength, columnBase, columns, rowBase, rows, transposeMatrix| Constructor and Description |
|---|
DoubleSuperSparseMatrix(String matrixFile) |
DoubleSuperSparseMatrix(String matrixFile,
boolean mergeMode,
boolean miniMode) |
DoubleSuperSparseMatrix(String indexFile,
String matrixFile) |
DoubleSuperSparseMatrix(String indexFile,
String matrixFile,
boolean mergeMode,
boolean miniMode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int row,
int column,
double score)
It is equal to create a double cell and then add the cell to the sparse matrix.
|
Cell |
createCell(int row,
int column,
byte[] data)
This method will be called when the sparse matrix loads data from a binary file.
|
Cell |
createCell(int row,
int column,
String data)
This method will be called when the sparse matrix loads data from a text file.
|
protected AbstractFlatSparseMatrix |
createFlatSparseMatrix(boolean mergeMode,
boolean miniMode) |
protected Row |
createRow(int row,
int columns,
byte[] data) |
SparseMatrix |
createSparseMatrix()
This method return an empty sparse matrix with the same implemented type as the current matrix.
|
double |
getColumnSum(int column) |
double |
getDouble(int row,
int column)
Return the score stored in the specified cell.
|
double |
getNonZeroDoubleScoreInRow(int row,
int index)
This method returns the double score of the index-th non-zero cell in the given row.
|
double[] |
getNonZeroDoubleScoresInRow(int row)
If the given row has n non-zero cells, this method returns a n-length double array.
|
double |
getRowSum(int row) |
add, close, finalizeData, flush, getCell, getIndexFilename, getMatrixFilename, getNonZeroCellInRow, getNonZeroColumnInRow, getNonZeroColumnsInRow, getNonZeroNum, getNonZeroNumInRow, getRow, setCache, setFlushIntervalcosine, finalizeData, genCooccurrenceMatrix, genCooccurrenceMatrix, genCooccurrenceMatrix, genTranslationMatrix, getCooccurrenceCount, getInt, getNonZeroCellInColumn, getNonZeroDoubleScoreInColumn, getNonZeroDoubleScoresInColumn, getNonZeroIntScoreInColumn, getNonZeroIntScoreInRow, getNonZeroIntScoresInColumn, getNonZeroIntScoresInRow, getNonZeroNumInColumn, getNonZeroRowInColumn, getNonZeroRowsInColumn, isFinalized, transposecolumns, getBaseColumn, getBaseRow, getCellDataLength, getTranspose, rows, setTransposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, finalizeData, finalizeData, flush, genCooccurrenceMatrix, genCooccurrenceMatrix, genCooccurrenceMatrix, getCell, getNonZeroCellInColumn, getNonZeroCellInRow, getNonZeroColumnInRow, getNonZeroColumnsInRow, getNonZeroDoubleScoreInColumn, getNonZeroDoubleScoresInColumn, getNonZeroIntScoreInColumn, getNonZeroIntScoreInRow, getNonZeroIntScoresInColumn, getNonZeroIntScoresInRow, getNonZeroNum, getNonZeroNumInColumn, getNonZeroNumInRow, getNonZeroRowInColumn, getNonZeroRowsInColumn, isFinalizedclose, columns, cosine, getBaseColumn, getBaseRow, getCellDataLength, getCooccurrenceCount, getInt, getTranspose, rows, setTranspose, transposepublic DoubleSuperSparseMatrix(String matrixFile)
public DoubleSuperSparseMatrix(String matrixFile, boolean mergeMode, boolean miniMode)
public SparseMatrix createSparseMatrix()
SparseMatrixcreateSparseMatrix in interface SparseMatrixprotected AbstractFlatSparseMatrix createFlatSparseMatrix(boolean mergeMode, boolean miniMode)
createFlatSparseMatrix in class AbstractSuperSparseMatrixprotected Row createRow(int row, int columns, byte[] data)
createRow in class AbstractSuperSparseMatrixpublic Cell createCell(int row, int column, byte[] data)
SparseMatrixcreateCell in interface SparseMatrixrow - the row index of the cellcolumn - the column index of the celldata - the input data for the cellpublic Cell createCell(int row, int column, String data)
SparseMatrixcreateCell in interface SparseMatrixrow - the row index of the cellcolumn - the column index of the celldata - the input data for the cellpublic boolean add(int row,
int column,
double score)
DoubleSparseMatrixadd in interface DoubleSparseMatrixrow - the row of the cellcolumn - the column of the cellscore - the score of the cellpublic double getDouble(int row,
int column)
MatrixgetDouble in interface MatrixgetDouble in class AbstractSparseMatrixrow - the row index of the cellcolumn - the column index of the cellpublic double getNonZeroDoubleScoreInRow(int row,
int index)
SparseMatrixgetNonZeroDoubleScoreInRow in interface SparseMatrixgetNonZeroDoubleScoreInRow in class AbstractSparseMatrixrow - the index of the row.index - the index-th non-zero cellpublic double[] getNonZeroDoubleScoresInRow(int row)
SparseMatrixgetNonZeroDoubleScoresInRow in interface SparseMatrixgetNonZeroDoubleScoresInRow in class AbstractSparseMatrixrow - the index of rowpublic double getRowSum(int row)
getRowSum in interface DoubleSparseMatrixrow - the index of the rowpublic double getColumnSum(int column)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.