Class SparseBlockFactory


  • public abstract class SparseBlockFactory
    extends Object
    • Constructor Detail

      • SparseBlockFactory

        public SparseBlockFactory()
    • Method Detail

      • createSparseBlock

        public static SparseBlock createSparseBlock​(int rlen)
      • estimateSizeSparseInMemory

        public static long estimateSizeSparseInMemory​(SparseBlock.Type type,
                                                      long nrows,
                                                      long ncols,
                                                      double sparsity)
      • createIdentityMatrix

        public static SparseBlock createIdentityMatrix​(int nRowCol)
      • createIdentityMatrixWithEmptyRow

        public static SparseBlock createIdentityMatrixWithEmptyRow​(int nRowCol)
      • createFromArray

        public static SparseBlock createFromArray​(double[] valsDense,
                                                  int nCol,
                                                  int nnz)
        Create a sparse block from an array. Note that the nnz count should be absolutely correct for this call to work.
        Parameters:
        valsDense - a double array of values linearized.
        nCol - The number of columns in reach row.
        nnz - The number of non zero values.
        Returns:
        A sparse block.