Class CompRowMatrixUtils
java.lang.Object
ubic.gemma.core.datastructure.sparse.CompRowMatrixUtils
Utilities for
CompRowMatrix.- Author:
- poirigui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic no.uib.cipr.matrix.sparse.CompRowMatrixnewCompRowMatrix(int numRows, int numColumns, int[] rowptr, int[] colind, double[] data) Create a compressed row matrix from its internal arrays using reflection.static no.uib.cipr.matrix.sparse.CompRowMatrixselectColumns(no.uib.cipr.matrix.sparse.CompRowMatrix matrix, int[] columns) Select the specified columns from a compressed row matrix.static no.uib.cipr.matrix.sparse.CompRowMatrixselectRows(no.uib.cipr.matrix.sparse.CompRowMatrix matrix, int[] rows) Select the specified rows from a compressed row matrix.
-
Constructor Details
-
CompRowMatrixUtils
public CompRowMatrixUtils()
-
-
Method Details
-
newCompRowMatrix
public static no.uib.cipr.matrix.sparse.CompRowMatrix newCompRowMatrix(int numRows, int numColumns, int[] rowptr, int[] colind, double[] data) Create a compressed row matrix from its internal arrays using reflection.This is much faster than using the public constructor, but no validation is performed, so you have to make sure that it is correct.
-
selectRows
public static no.uib.cipr.matrix.sparse.CompRowMatrix selectRows(no.uib.cipr.matrix.sparse.CompRowMatrix matrix, int[] rows) Select the specified rows from a compressed row matrix. -
selectColumns
public static no.uib.cipr.matrix.sparse.CompRowMatrix selectColumns(no.uib.cipr.matrix.sparse.CompRowMatrix matrix, int[] columns) Select the specified columns from a compressed row matrix.If the requested columns are sorted, the method will perform a more efficient binary search by narrowing down the range for locating columns. If in addition, the requested columns are unique, this method will be able to finish early when it reaches the end of the search range.
-