Class SparseBlockFactory

java.lang.Object
org.apache.sysds.runtime.data.SparseBlockFactory

public abstract class SparseBlockFactory extends Object
  • Constructor Details

    • SparseBlockFactory

      public SparseBlockFactory()
  • Method Details

    • createSparseBlock

      public static SparseBlock createSparseBlock(int rlen)
    • createSparseBlock

      public static SparseBlock createSparseBlock(SparseBlock.Type type, int rlen)
    • createSparseBlock

      public static SparseBlock createSparseBlock(SparseBlock.Type type, SparseRow row)
    • copySparseBlock

      public static SparseBlock copySparseBlock(SparseBlock.Type type, SparseBlock sblock, boolean forceCopy)
    • copySparseBlock

      public static SparseBlock copySparseBlock(SparseBlock.Type type, SparseBlock sblock, boolean forceCopy, int clen)
    • isSparseBlockType

      public static boolean isSparseBlockType(SparseBlock sblock, SparseBlock.Type type)
    • 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.