Class SparseMatrix
- java.lang.Object
-
- ubic.gemma.core.loader.util.anndata.SparseMatrix
-
- All Implemented Interfaces:
AutoCloseable
,Matrix
public class SparseMatrix extends Object implements Matrix
Represents a sparse AnnData matrix.- Author:
- poirigui
-
-
Constructor Summary
Constructors Constructor Description SparseMatrix(H5Group group)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Release the underlying H5 resource for this matrix.H5Dataset
getData()
Obtain the H5 dataset underlying this matrix.H5Type
getDataType()
Obtain the data type used for the scalars of this matrix.H5Dataset
getIndices()
int[]
getIndptr()
int[]
getShape()
Obtain the shape of this matrix.boolean
isCsc()
Indicate if this matrix is stored in CSC.boolean
isCsr()
Indicate if this matrix is stored in CSR.
-
-
-
Constructor Detail
-
SparseMatrix
public SparseMatrix(H5Group group)
-
-
Method Detail
-
isCsr
public boolean isCsr()
Indicate if this matrix is stored in CSR.
-
isCsc
public boolean isCsc()
Indicate if this matrix is stored in CSC.
-
getShape
public int[] getShape()
Description copied from interface:Matrix
Obtain the shape of this matrix.
-
getDataType
public H5Type getDataType()
Description copied from interface:Matrix
Obtain the data type used for the scalars of this matrix.- Specified by:
getDataType
in interfaceMatrix
-
getIndptr
public int[] getIndptr()
-
getData
public H5Dataset getData()
Description copied from interface:Matrix
Obtain the H5 dataset underlying this matrix.
-
getIndices
public H5Dataset getIndices()
-
close
public void close()
Description copied from interface:Matrix
Release the underlying H5 resource for this matrix.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceMatrix
-
-