Class CompressedMatrixBlock
- java.lang.Object
- 
- org.apache.sysds.runtime.matrix.data.MatrixValue
- 
- org.apache.sysds.runtime.matrix.data.MatrixBlock
- 
- org.apache.sysds.runtime.compress.CompressedMatrixBlock
 
 
 
- 
- All Implemented Interfaces:
- Externalizable,- Serializable,- Comparable,- org.apache.hadoop.io.Writable,- org.apache.hadoop.io.WritableComparable,- CacheBlock
 
 public class CompressedMatrixBlock extends MatrixBlock - See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.sysds.runtime.matrix.data.MatrixBlockMatrixBlock.SparsityEstimate
 - 
Nested classes/interfaces inherited from class org.apache.sysds.runtime.matrix.data.MatrixValueMatrixValue.CellIndex
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.sysds.runtime.matrix.data.MatrixBlockCONVERT_MCSR_TO_CSR_ON_DEEP_SERIALIZE, DEFAULT_INPLACE_SPARSEBLOCK, DEFAULT_SPARSEBLOCK, HEADER_SIZE, MAX_SHALLOW_SERIALIZE_OVERHEAD, SPARSITY_TURN_POINT, ULTRA_SPARSE_BLOCK_NNZ, ULTRA_SPARSITY_TURN_POINT, ULTRA_SPARSITY_TURN_POINT2
 
- 
 - 
Constructor SummaryConstructors Constructor Description CompressedMatrixBlock()CompressedMatrixBlock(int rl, int cl)Main constructor for building a block from scratch.CompressedMatrixBlock(CompressedMatrixBlock that)Copy constructor taking that CompressedMatrixBlock and populate this new compressedMatrixBlock with pointers to the same columnGroups.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MatrixBlockaggregateBinaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, AggregateBinaryOperator op)MatrixBlockaggregateBinaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, AggregateBinaryOperator op, boolean transposeLeft, boolean transposeRight)MatrixBlockaggregateTernaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret, AggregateTernaryOperator op, boolean inCP)MatrixBlockaggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP)voidallocateAndResetSparseBlock(boolean clearNNZ, SparseBlock.Type stype)Future<MatrixBlock>allocateBlockAsync()voidallocateColGroup(AColGroup cg)Allocate the given column group and remove all references to old column groups.voidallocateColGroupList(List<AColGroup> colGroups)Replace the column groups in this CompressedMatrixBlock with the given column groupsbooleanallocateDenseBlock(boolean clearNNZ)booleanallocateSparseRowsBlock(boolean clearNNZ)MatrixBlockappend(MatrixBlock[] that, MatrixBlock ret, boolean cbind)voidappend(MatrixValue v2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol)voidappendRow(int r, SparseRow row, boolean deep)voidappendRowToSparse(SparseBlock dest, MatrixBlock src, int i, int rowoffset, int coloffset, boolean deep)voidappendValue(int r, int c, double v)Append value is only used when values are appended at the end of each row for the sparse representation This can only be called, when the caller knows the access pattern of the blockvoidappendValuePlain(int r, int c, double v)static longbaseSizeInMemory()MatrixBlockbinaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result)MatrixBlockbinaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue)MatrixBlockbinaryOperationsLeft(BinaryOperator op, MatrixValue thatValue, MatrixValue result)MatrixBlockchainMatrixMultOperations(MatrixBlock v, MatrixBlock w, MatrixBlock out, MapMultChain.ChainType ctype, int k)voidcheckNaN()Checks for existing NaN values in the matrix block.voidclearSoftReferenceToDecompressed()CM_COV_ObjectcmOperations(CMOperator op)CM_COV_ObjectcmOperations(CMOperator op, MatrixBlock weights)MatrixBlockcolSum()Wrapper method for single threaded reduceall-colSum of a matrix.voidcompactEmptyBlock()Free unnecessarily allocated empty block.booleancontainsValue(double pattern)voidcopy(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ)In-place copy of matrix src into the index range of the existing current matrix.voidcopy(MatrixValue thatValue)Copy that MatrixValue into this MatrixValue.voidcopy(MatrixValue thatValue, boolean sp)Copy that MatrixValue into this MatrixValue.MatrixBlockcopyShallow(MatrixBlock that)CM_COV_ObjectcovOperations(COVOperator op, MatrixBlock that)CM_COV_ObjectcovOperations(COVOperator op, MatrixBlock that, MatrixBlock weights)voidctableOperations(Operator op, double scalar, double scalar2, CTableMap resultMap, MatrixBlock resultBlock)D = ctable(A,v2,w) this <- A; scalar_that <- v2; scalar_that2 <- w; result <- D (i1,j1,v1) from input1 (this) (v2) from sclar_input2 (scalarThat) (w) from scalar_input3 (scalarThat2)voidctableOperations(Operator op, double scalar, MatrixValue that, CTableMap resultMap, MatrixBlock resultBlock)D = ctable(A,v2,W) this <- A; scalarThat <- v2; that2 <- W; result <- D (i1,j1,v1) from input1 (this) (v2) from sclar_input2 (scalarThat) (i3,j3,w) from input3 (that2)voidctableOperations(Operator op, MatrixIndexes ix1, double scalar, boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock)Specific ctable case of ctable(seq(...),X), where X is the only matrix input.voidctableOperations(Operator op, MatrixValue that, double scalar, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock)D = ctable(A,B,w) this <- A; that <- B; scalar_that2 <- w; result <- D (i1,j1,v1) from input1 (this) (i1,j1,v2) from input2 (that) (w) from scalar_input3 (scalarThat2) NOTE: This method supports both vectors and matrices.voidctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)MatrixBlockctableSeqOperations(MatrixValue thatMatrix, double thatScalar, MatrixBlock resultBlock, boolean updateClen)MatrixBlockdecompress()Decompress block into a MatrixBlockMatrixBlockdecompress(int k)Decompress block into a MatrixBlockvoiddropLastRowsOrColumns(Types.CorrectionLocationType correctionLocation)longestimateCompressedSizeInMemory()Obtain an upper bound on the memory used to store the compressed block.longestimateSizeInMemory()longestimateSizeOnDisk()booleanevalSparseFormatInMemory()Evaluates if this matrix block should be in sparse format in memory.booleanevalSparseFormatOnDisk()Evaluates if this matrix block should be in sparse format on disk.voidexamSparsity(boolean allowCSR)Evaluates if this matrix block should be in sparse format in memory.MatrixBlockextractTriangular(MatrixBlock ret, boolean lower, boolean diag, boolean values)MatrixBlockgetCachedDecompressed()Get the cached decompressed matrix (if it exists otherwise null).List<AColGroup>getColGroups()Get the column groups of this CompressedMatrixBlockDenseBlockgetDenseBlock()double[]getDenseBlockValues()longgetExactSizeOnDisk()NOTE: The used estimates must be kept consistent with the respective write functions.longgetInMemorySize()Get the in-memory size in bytes of the cache block.SoftReference<MatrixBlock>getSoftReferenceToDecompressed()SparseBlockgetSparseBlock()Iterator<IJV>getSparseBlockIterator()Iterator<IJV>getSparseBlockIterator(int rl, int ru)MatrixBlockgetUncompressed()MatrixBlockgetUncompressed(String operation)MatrixBlockgetUncompressed(String operation, int k)static MatrixBlockgetUncompressed(MatrixValue mVal)static MatrixBlockgetUncompressed(MatrixValue mVal, String message)doublegetValueDenseUnsafe(int r, int c)MatrixBlockgroupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op, int k)voidincrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection)voidincrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep)voidinit(double[][] arr, int r, int c)NOTE: This method is designed only for dense representation.voidinit(double[] arr, int r, int c)NOTE: This method is designed only for dense representation.doubleinterQuartileMean()booleanisAllocated()booleanisEmptyBlock(boolean safe)booleanisInSparseFormat()Returns the current representation (true for sparse).booleanisOverlapping()booleanisShallowSerialize(boolean inclConvert)Indicates if the cache block is subject to shallow serialized, which is generally true if in-memory size and serialized size are almost identical allowing to avoid unnecessary deep serialize.booleanisSparsePermutationMatrix()booleanisThreadSafe()Indicates if concurrent modifications of disjoint rows are thread-safe.booleanisUltraSparse()booleanisUltraSparse(boolean checkNnz)MatrixBlockleftIndexingOperations(ScalarObject scalar, int rl, int cl, MatrixBlock ret, MatrixObject.UpdateType update)Explicitly allow left indexing for scalars.MatrixBlockleftIndexingOperations(MatrixBlock rhsMatrix, int rl, int ru, int cl, int cu, MatrixBlock ret, MatrixObject.UpdateType update)doublemax()Wrapper method for reduceall-max of a matrix.doublemean()Wrapper method for reduceall-mean of a matrix.voidmerge(MatrixBlock that, boolean appendOnly, boolean par, boolean deep)doublemin()Wrapper method for reduceall-min of a matrix.doubleminNonZero()Utility function for computing the min non-zero value.voidpermutationMatrixMultOperations(MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val, int k)doublepickValue(double quantile, boolean average)MatrixBlockpickValues(MatrixValue quantiles, MatrixValue ret)doubleprod()Wrapper method for reduceall-product of a matrix.voidputInto(MatrixBlock target, int rowOffset, int colOffset, boolean sparseCopyShallow)Method for copying this matrix into a target matrix.MatrixBlockquaternaryOperations(QuaternaryOperator qop, MatrixBlock um, MatrixBlock vm, MatrixBlock wm, MatrixBlock out, int k)doublequickGetValue(int r, int c)doublequickGetValueThreadSafe(int r, int c)voidquickSetValue(int r, int c, double v)MatrixBlockrandOperationsInPlace(RandomMatrixGenerator rgen, org.apache.commons.math3.random.Well1024a bigrand, long bSeed)Function to generate a matrix of random numbers.MatrixBlockrandOperationsInPlace(RandomMatrixGenerator rgen, org.apache.commons.math3.random.Well1024a bigrand, long bSeed, int k)Function to generate a matrix of random numbers.voidreadExternal(ObjectInput is)Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd de-serialization.voidreadFields(DataInput in)longrecomputeNonZeros()Recomputes and materializes the number of non-zero values of the entire matrix block.longrecomputeNonZeros(int rl, int ru)longrecomputeNonZeros(int rl, int ru, int cl, int cu)Recomputes the number of non-zero values of a specified range of the matrix block.MatrixBlockremoveEmptyOperations(MatrixBlock ret, boolean rows, boolean emptyReturn, MatrixBlock select)MatrixBlockreorgOperations(ReorgOperator op, MatrixValue ret, int startRow, int startColumn, int length)MatrixBlockreplaceOperations(MatrixValue result, double pattern, double replacement)voidreset(int rl, int cl, boolean sp, long estnnz, double val)Internal canonical reset of dense and sparse matrix blocks.MatrixBlockrexpandOperations(MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore, int k)MatrixBlockscalarOperations(ScalarOperator sop, MatrixValue result)MatrixBlockseqOperationsInPlace(double from, double to, double incr)voidsetDenseBlock(DenseBlock dblock)voidsetOverlapping(boolean overlapping)voidsetSparseBlock(SparseBlock sblock)MatrixBlockslice(int rl, int ru, int cl, int cu, boolean deep, CacheBlock ret)Method to perform rightIndex operation for a given lower and upper bounds in row and column dimensions.voidslice(ArrayList<IndexedMatrixValue> outlist, IndexRange range, int rowCut, int colCut, int blen, int boundaryRlen, int boundaryClen)Slice out up to 4 matrixBlocks that are separated by the row and col Cuts.MatrixBlocksortOperations(MatrixValue weights, MatrixBlock result)voidsortSparseRows()Sorts all existing sparse rows by column indexes.voidsortSparseRows(int rl, int ru)Sorts all existing sparse rows in range [rl,ru) by column indexes.voidsparseToDense()CompressedMatrixBlocksquash(int k)doublesum()Wrapper method for reduceall-sum of a matrix.doublesumSq()Wrapper method for reduceall-sumSq of a matrix.doublesumWeightForQuantile()In a given two column matrix, the second column denotes weights.MatrixBlockternaryOperations(TernaryOperator op, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret)voidtoShallowSerializeBlock()Converts a cache block that is not shallow serializable into a form that is shallow serializable.StringtoString()MatrixBlocktransposeSelfMatrixMultOperations(MatrixBlock out, MMTSJ.MMTSJType tstype, int k)MatrixBlockuaggouterchainOperations(MatrixBlock mbLeft, MatrixBlock mbRight, MatrixBlock mbOut, BinaryOperator bOp, AggregateUnaryOperator uaggOp)MatrixBlockunaryOperations(UnaryOperator op, MatrixValue result)voidwrite(DataOutput out)voidwriteExternal(ObjectOutput os)Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.MatrixBlockzeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)- 
Methods inherited from class org.apache.sysds.runtime.matrix.data.MatrixBlockaggregateBinaryOperations, aggregateUnaryOperations, allocateBlock, allocateDenseBlock, allocateDenseBlockUnsafe, allocateSparseRowsBlock, append, append, appendRow, appendToSparse, binaryOperations, chainMatrixMultOperations, checkCMOperations, checkDimensionsForAppend, checkNonZeros, checkSparseRows, checkSparseRows, cleanupBlock, colMax, colMin, compareTo, computeIQMCorrection, ctableOperations, ctableSeqOperations, denseToSparse, equals, estimateSizeDenseInMemory, estimateSizeDenseInMemory, estimateSizeInMemory, estimateSizeOnDisk, estimateSizeSparseInMemory, estimateSizeSparseInMemory, estimateSizeSparseInMemory, estimateSizeSparseInMemory, estimateSizeSparseInMemory, evalSparseFormatInMemory, evalSparseFormatInMemory, evalSparseFormatInMemory, evalSparseFormatInMemory, evalSparseFormatOnDisk, examSparsity, getDataCharacteristics, getDouble, getDoubleNaN, getExactSerializedSize, getHeaderSize, getLength, getNonZeros, getNumColumns, getNumRows, getSparsity, getString, getValue, groupedAggOperations, hashCode, isEmpty, isEmptyBlock, isShallowSerialize, isThreadSafe, isVector, leftIndexingOperations, median, merge, merge, merge, naryOperations, permutationMatrixMultOperations, pickValue, prepareAggregateUnaryOutput, quaternaryOperations, randOperations, randOperations, randOperations, randOperations, removeEmptyOperations, reset, reset, reset, reset, reset, reset, rowSum, rowSum, sampleOperations, seqOperations, setAllNonZeros, setNonZeros, setNumColumns, setNumRows, setValue, slice, slice, slice, slice, slice, slice, sortOperations, sortOperations, sortOperations, transposeSelfMatrixMultOperations
 
- 
 
- 
- 
- 
Constructor Detail- 
CompressedMatrixBlockpublic CompressedMatrixBlock() 
 - 
CompressedMatrixBlockpublic CompressedMatrixBlock(int rl, int cl)Main constructor for building a block from scratch. Use with caution, since it constructs an empty matrix block with nothing inside.- Parameters:
- rl- number of rows in the block
- cl- number of columns
 
 - 
CompressedMatrixBlockpublic CompressedMatrixBlock(CompressedMatrixBlock that) Copy constructor taking that CompressedMatrixBlock and populate this new compressedMatrixBlock with pointers to the same columnGroups.- Parameters:
- that- CompressedMatrixBlock to copy values from
 
 
- 
 - 
Method Detail- 
resetpublic void reset(int rl, int cl, boolean sp, long estnnz, double val)Description copied from class:MatrixBlockInternal canonical reset of dense and sparse matrix blocks.- Overrides:
- resetin class- MatrixBlock
- Parameters:
- rl- number of rows
- cl- number of columns
- sp- sparse representation
- estnnz- estimated number of non-zeros
- val- initialization value
 
 - 
allocateColGrouppublic void allocateColGroup(AColGroup cg) Allocate the given column group and remove all references to old column groups. This is done by simply allocating a ned _colGroups list and adding the given column group- Parameters:
- cg- The column group to use after.
 
 - 
allocateColGroupListpublic void allocateColGroupList(List<AColGroup> colGroups) Replace the column groups in this CompressedMatrixBlock with the given column groups- Parameters:
- colGroups- new ColGroups in the MatrixBlock
 
 - 
getColGroupspublic List<AColGroup> getColGroups() Get the column groups of this CompressedMatrixBlock- Returns:
- the column groups
 
 - 
decompresspublic MatrixBlock decompress() Decompress block into a MatrixBlock- Returns:
- a new uncompressed matrix block containing the contents of this block
 
 - 
decompresspublic MatrixBlock decompress(int k) Decompress block into a MatrixBlock- Parameters:
- k- degree of parallelism
- Returns:
- a new uncompressed matrix block containing the contents of this block
 
 - 
putIntopublic void putInto(MatrixBlock target, int rowOffset, int colOffset, boolean sparseCopyShallow) Description copied from class:MatrixBlockMethod for copying this matrix into a target matrix. Note that this method does not maintain number of non zero values. The method should output into the allocated block type of the target, therefore before any calls an appropriate block must be allocated. CSR sparse format is not supported. If allocating into a sparse matrix MCSR block the rows have to be sorted afterwards with a call to target.sortSparseRows()- Overrides:
- putIntoin class- MatrixBlock
- Parameters:
- target- Target MatrixBlock, that can be allocated dense or sparse
- rowOffset- The Row offset to allocate into.
- colOffset- The column offset to allocate into.
- sparseCopyShallow- If the output is sparse, and shallow copy of rows is allowed from this block
 
 - 
getCachedDecompressedpublic MatrixBlock getCachedDecompressed() Get the cached decompressed matrix (if it exists otherwise null). This in practice means that if some other instruction have materialized the decompressed version it can be accessed though this method with a guarantee that it did not go through the entire decompression phase.- Returns:
- The cached decompressed matrix, if it does not exist return null
 
 - 
squashpublic CompressedMatrixBlock squash(int k) 
 - 
recomputeNonZerospublic long recomputeNonZeros() Description copied from class:MatrixBlockRecomputes and materializes the number of non-zero values of the entire matrix block.- Overrides:
- recomputeNonZerosin class- MatrixBlock
- Returns:
- number of non-zeros
 
 - 
recomputeNonZerospublic long recomputeNonZeros(int rl, int ru)- Overrides:
- recomputeNonZerosin class- MatrixBlock
 
 - 
recomputeNonZerospublic long recomputeNonZeros(int rl, int ru, int cl, int cu)Description copied from class:MatrixBlockRecomputes the number of non-zero values of a specified range of the matrix block. NOTE: This call does not materialize the compute result in any form.- Overrides:
- recomputeNonZerosin class- MatrixBlock
- Parameters:
- rl- row lower index, 0-based, inclusive
- ru- row upper index, 0-based, inclusive
- cl- column lower index, 0-based, inclusive
- cu- column upper index, 0-based, inclusive
- Returns:
- the number of non-zero values
 
 - 
getInMemorySizepublic long getInMemorySize() Description copied from interface:CacheBlockGet the in-memory size in bytes of the cache block.- Specified by:
- getInMemorySizein interface- CacheBlock
- Overrides:
- getInMemorySizein class- MatrixBlock
- Returns:
- in-memory size in bytes of cache block
 
 - 
estimateSizeInMemorypublic long estimateSizeInMemory() - Overrides:
- estimateSizeInMemoryin class- MatrixBlock
 
 - 
estimateCompressedSizeInMemorypublic long estimateCompressedSizeInMemory() Obtain an upper bound on the memory used to store the compressed block.- Returns:
- an upper bound on the memory used to store this compressed block considering class overhead.
 
 - 
baseSizeInMemorypublic static long baseSizeInMemory() 
 - 
quickGetValuepublic double quickGetValue(int r, int c)- Overrides:
- quickGetValuein class- MatrixBlock
 
 - 
getExactSizeOnDiskpublic long getExactSizeOnDisk() Description copied from class:MatrixBlockNOTE: The used estimates must be kept consistent with the respective write functions.- Overrides:
- getExactSizeOnDiskin class- MatrixBlock
- Returns:
- exact size on disk
 
 - 
estimateSizeOnDiskpublic long estimateSizeOnDisk() - Overrides:
- estimateSizeOnDiskin class- MatrixBlock
 
 - 
readFieldspublic void readFields(DataInput in) throws IOException - Specified by:
- readFieldsin interface- org.apache.hadoop.io.Writable
- Overrides:
- readFieldsin class- MatrixBlock
- Throws:
- IOException
 
 - 
writepublic void write(DataOutput out) throws IOException - Specified by:
- writein interface- org.apache.hadoop.io.Writable
- Overrides:
- writein class- MatrixBlock
- Throws:
- IOException
 
 - 
readExternalpublic void readExternal(ObjectInput is) throws IOException Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd de-serialization.- Specified by:
- readExternalin interface- Externalizable
- Overrides:
- readExternalin class- MatrixBlock
- Parameters:
- is- object input
- Throws:
- IOException- if IOException occurs
 
 - 
writeExternalpublic void writeExternal(ObjectOutput os) throws IOException Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.- Specified by:
- writeExternalin interface- Externalizable
- Overrides:
- writeExternalin class- MatrixBlock
- Parameters:
- os- object output
- Throws:
- IOException- if IOException occurs
 
 - 
scalarOperationspublic MatrixBlock scalarOperations(ScalarOperator sop, MatrixValue result) - Overrides:
- scalarOperationsin class- MatrixBlock
 
 - 
binaryOperationspublic MatrixBlock binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) - Overrides:
- binaryOperationsin class- MatrixBlock
 
 - 
binaryOperationsLeftpublic MatrixBlock binaryOperationsLeft(BinaryOperator op, MatrixValue thatValue, MatrixValue result) 
 - 
appendpublic MatrixBlock append(MatrixBlock[] that, MatrixBlock ret, boolean cbind) - Overrides:
- appendin class- MatrixBlock
 
 - 
appendpublic void append(MatrixValue v2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol) - Overrides:
- appendin class- MatrixBlock
 
 - 
chainMatrixMultOperationspublic MatrixBlock chainMatrixMultOperations(MatrixBlock v, MatrixBlock w, MatrixBlock out, MapMultChain.ChainType ctype, int k) - Overrides:
- chainMatrixMultOperationsin class- MatrixBlock
 
 - 
aggregateBinaryOperationspublic MatrixBlock aggregateBinaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, AggregateBinaryOperator op) - Overrides:
- aggregateBinaryOperationsin class- MatrixBlock
 
 - 
aggregateBinaryOperationspublic MatrixBlock aggregateBinaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, AggregateBinaryOperator op, boolean transposeLeft, boolean transposeRight) 
 - 
aggregateUnaryOperationspublic MatrixBlock aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP) - Overrides:
- aggregateUnaryOperationsin class- MatrixBlock
 
 - 
transposeSelfMatrixMultOperationspublic MatrixBlock transposeSelfMatrixMultOperations(MatrixBlock out, MMTSJ.MMTSJType tstype, int k) - Overrides:
- transposeSelfMatrixMultOperationsin class- MatrixBlock
 
 - 
replaceOperationspublic MatrixBlock replaceOperations(MatrixValue result, double pattern, double replacement) - Overrides:
- replaceOperationsin class- MatrixBlock
 
 - 
reorgOperationspublic MatrixBlock reorgOperations(ReorgOperator op, MatrixValue ret, int startRow, int startColumn, int length) - Overrides:
- reorgOperationsin class- MatrixBlock
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- MatrixBlock
 
 - 
isOverlappingpublic boolean isOverlapping() 
 - 
setOverlappingpublic void setOverlapping(boolean overlapping) 
 - 
slicepublic MatrixBlock slice(int rl, int ru, int cl, int cu, boolean deep, CacheBlock ret) Description copied from class:MatrixBlockMethod to perform rightIndex operation for a given lower and upper bounds in row and column dimensions. Extracted submatrix is returned as "result". Note: This operation is now 0-based. This means that if you call with rl == ru then you get 1 row output.- Specified by:
- slicein interface- CacheBlock
- Overrides:
- slicein class- MatrixBlock
- Parameters:
- rl- row lower if this value is below 0 or above the number of rows contained in the matrix an exception is thrown
- ru- row upper if this value is below rl or above the number of rows contained in the matrix an exception is thrown
- cl- column lower if this value us below 0 or above the number of columns contained in the matrix an exception is thrown
- cu- column upper if this value us below cl or above the number of columns contained in the matrix an exception is thrown
- deep- should perform deep copy, this is relevant in cases where the matrix is in sparse format, or the entire matrix is sliced out
- ret- output sliced out matrix block
- Returns:
- matrix block output matrix block
 
 - 
slicepublic void slice(ArrayList<IndexedMatrixValue> outlist, IndexRange range, int rowCut, int colCut, int blen, int boundaryRlen, int boundaryClen) Description copied from class:MatrixValueSlice out up to 4 matrixBlocks that are separated by the row and col Cuts. This is used in the context of spark execution to distributed sliced out matrix blocks of correct block size.- Overrides:
- slicein class- MatrixBlock
- Parameters:
- outlist- The output matrix blocks that is extracted from the matrix
- range- An index range containing overlapping information.
- rowCut- The row to cut and split the matrix.
- colCut- The column to cut ans split the matrix.
- blen- The Block size of the output matrices.
- boundaryRlen- The row length of the edge case matrix block, used for the final blocks that does not have enough rows to construct a full block.
- boundaryClen- The col length of the edge case matrix block, used for the final blocks that does not have enough cols to construct a full block.
 
 - 
unaryOperationspublic MatrixBlock unaryOperations(UnaryOperator op, MatrixValue result) - Overrides:
- unaryOperationsin class- MatrixBlock
 
 - 
containsValuepublic boolean containsValue(double pattern) - Overrides:
- containsValuein class- MatrixBlock
 
 - 
maxpublic double max() Description copied from class:MatrixBlockWrapper method for reduceall-max of a matrix.- Overrides:
- maxin class- MatrixBlock
- Returns:
- the maximum value of all values in the matrix
 
 - 
minpublic double min() Description copied from class:MatrixBlockWrapper method for reduceall-min of a matrix.- Overrides:
- minin class- MatrixBlock
- Returns:
- the minimum value of all values in the matrix
 
 - 
sumpublic double sum() Description copied from class:MatrixBlockWrapper method for reduceall-sum of a matrix.- Overrides:
- sumin class- MatrixBlock
- Returns:
- Sum of the values in the matrix.
 
 - 
colSumpublic MatrixBlock colSum() Description copied from class:MatrixBlockWrapper method for single threaded reduceall-colSum of a matrix.- Overrides:
- colSumin class- MatrixBlock
- Returns:
- A new MatrixBlock containing the column sums of this matrix.
 
 - 
sumSqpublic double sumSq() Description copied from class:MatrixBlockWrapper method for reduceall-sumSq of a matrix.- Overrides:
- sumSqin class- MatrixBlock
- Returns:
- Sum of the squared values in the matrix.
 
 - 
prodpublic double prod() Description copied from class:MatrixBlockWrapper method for reduceall-product of a matrix.- Overrides:
- prodin class- MatrixBlock
- Returns:
- the product sum of the matrix content
 
 - 
meanpublic double mean() Description copied from class:MatrixBlockWrapper method for reduceall-mean of a matrix.- Overrides:
- meanin class- MatrixBlock
- Returns:
- the mean value of all values in the matrix
 
 - 
rexpandOperationspublic MatrixBlock rexpandOperations(MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore, int k) - Overrides:
- rexpandOperationsin class- MatrixBlock
 
 - 
isEmptyBlockpublic boolean isEmptyBlock(boolean safe) - Overrides:
- isEmptyBlockin class- MatrixBlock
 
 - 
binaryOperationsInPlacepublic MatrixBlock binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) - Overrides:
- binaryOperationsInPlacein class- MatrixBlock
 
 - 
incrementalAggregatepublic void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep) - Overrides:
- incrementalAggregatein class- MatrixBlock
 
 - 
incrementalAggregatepublic void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection) - Overrides:
- incrementalAggregatein class- MatrixBlock
 
 - 
permutationMatrixMultOperationspublic void permutationMatrixMultOperations(MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val, int k) - Overrides:
- permutationMatrixMultOperationsin class- MatrixBlock
 
 - 
leftIndexingOperationspublic MatrixBlock leftIndexingOperations(MatrixBlock rhsMatrix, int rl, int ru, int cl, int cu, MatrixBlock ret, MatrixObject.UpdateType update) - Overrides:
- leftIndexingOperationsin class- MatrixBlock
 
 - 
leftIndexingOperationspublic MatrixBlock leftIndexingOperations(ScalarObject scalar, int rl, int cl, MatrixBlock ret, MatrixObject.UpdateType update) Description copied from class:MatrixBlockExplicitly allow left indexing for scalars. Note: This operation is now 0-based. * Operations to be performed: 1) result=this; 2) result[row,column] = scalar.getDoubleValue();- Overrides:
- leftIndexingOperationsin class- MatrixBlock
- Parameters:
- scalar- scalar object
- rl- row lower
- cl- column lower
- ret- ?
- update- ?
- Returns:
- matrix block
 
 - 
zeroOutOperationspublic MatrixBlock zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary) - Overrides:
- zeroOutOperationsin class- MatrixBlock
 
 - 
cmOperationspublic CM_COV_Object cmOperations(CMOperator op) - Overrides:
- cmOperationsin class- MatrixBlock
 
 - 
cmOperationspublic CM_COV_Object cmOperations(CMOperator op, MatrixBlock weights) - Overrides:
- cmOperationsin class- MatrixBlock
 
 - 
covOperationspublic CM_COV_Object covOperations(COVOperator op, MatrixBlock that) - Overrides:
- covOperationsin class- MatrixBlock
 
 - 
covOperationspublic CM_COV_Object covOperations(COVOperator op, MatrixBlock that, MatrixBlock weights) - Overrides:
- covOperationsin class- MatrixBlock
 
 - 
sortOperationspublic MatrixBlock sortOperations(MatrixValue weights, MatrixBlock result) - Overrides:
- sortOperationsin class- MatrixBlock
 
 - 
aggregateTernaryOperationspublic MatrixBlock aggregateTernaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret, AggregateTernaryOperator op, boolean inCP) - Overrides:
- aggregateTernaryOperationsin class- MatrixBlock
 
 - 
uaggouterchainOperationspublic MatrixBlock uaggouterchainOperations(MatrixBlock mbLeft, MatrixBlock mbRight, MatrixBlock mbOut, BinaryOperator bOp, AggregateUnaryOperator uaggOp) - Overrides:
- uaggouterchainOperationsin class- MatrixBlock
 
 - 
groupedAggOperationspublic MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op, int k) - Overrides:
- groupedAggOperationsin class- MatrixBlock
 
 - 
removeEmptyOperationspublic MatrixBlock removeEmptyOperations(MatrixBlock ret, boolean rows, boolean emptyReturn, MatrixBlock select) - Overrides:
- removeEmptyOperationsin class- MatrixBlock
 
 - 
ctableOperationspublic void ctableOperations(Operator op, double scalar, MatrixValue that, CTableMap resultMap, MatrixBlock resultBlock) Description copied from class:MatrixBlockD = ctable(A,v2,W) this <- A; scalarThat <- v2; that2 <- W; result <- D (i1,j1,v1) from input1 (this) (v2) from sclar_input2 (scalarThat) (i3,j3,w) from input3 (that2)- Overrides:
- ctableOperationsin class- MatrixBlock
 
 - 
ctableOperationspublic void ctableOperations(Operator op, double scalar, double scalar2, CTableMap resultMap, MatrixBlock resultBlock) Description copied from class:MatrixBlockD = ctable(A,v2,w) this <- A; scalar_that <- v2; scalar_that2 <- w; result <- D (i1,j1,v1) from input1 (this) (v2) from sclar_input2 (scalarThat) (w) from scalar_input3 (scalarThat2)- Overrides:
- ctableOperationsin class- MatrixBlock
 
 - 
ctableOperationspublic void ctableOperations(Operator op, MatrixIndexes ix1, double scalar, boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock) Description copied from class:MatrixBlockSpecific ctable case of ctable(seq(...),X), where X is the only matrix input. The 'left' input parameter specifies if the seq appeared on the left, otherwise it appeared on the right.- Overrides:
- ctableOperationsin class- MatrixBlock
 
 - 
ctableOperationspublic void ctableOperations(Operator op, MatrixValue that, double scalar, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock) Description copied from class:MatrixBlockD = ctable(A,B,w) this <- A; that <- B; scalar_that2 <- w; result <- D (i1,j1,v1) from input1 (this) (i1,j1,v2) from input2 (that) (w) from scalar_input3 (scalarThat2) NOTE: This method supports both vectors and matrices. In case of matrices and ignoreZeros=true we can also use a sparse-safe implementation- Overrides:
- ctableOperationsin class- MatrixBlock
 
 - 
ctableSeqOperationspublic MatrixBlock ctableSeqOperations(MatrixValue thatMatrix, double thatScalar, MatrixBlock resultBlock, boolean updateClen) - Overrides:
- ctableSeqOperationsin class- MatrixBlock
- Parameters:
- thatMatrix- matrix value
- thatScalar- scalar double
- resultBlock- result matrix block
- updateClen- when this matrix already has the desired number of columns updateClen can be set to false
- Returns:
- result matrix block
 
 - 
ctableOperationspublic void ctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) - Overrides:
- ctableOperationsin class- MatrixBlock
 
 - 
ternaryOperationspublic MatrixBlock ternaryOperations(TernaryOperator op, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret) - Overrides:
- ternaryOperationsin class- MatrixBlock
 
 - 
quaternaryOperationspublic MatrixBlock quaternaryOperations(QuaternaryOperator qop, MatrixBlock um, MatrixBlock vm, MatrixBlock wm, MatrixBlock out, int k) - Overrides:
- quaternaryOperationsin class- MatrixBlock
 
 - 
randOperationsInPlacepublic MatrixBlock randOperationsInPlace(RandomMatrixGenerator rgen, org.apache.commons.math3.random.Well1024a bigrand, long bSeed) Description copied from class:MatrixBlockFunction to generate a matrix of random numbers. This is invoked both from CP as well as from MR. In case of CP, it generates an entire matrix block-by-block. Abigrandis passed so that block-level seeds are generated internally. In case of MR, it generates a single block for given block-level seedbSeed. When pdf="uniform", cell values are drawn from uniform distribution in range[min,max]. When pdf="normal", cell values are drawn from standard normal distribution N(0,1). The range of generated values will always be (-Inf,+Inf).- Overrides:
- randOperationsInPlacein class- MatrixBlock
- Parameters:
- rgen- random matrix generator
- bigrand- ?
- bSeed- seed value
- Returns:
- matrix block
 
 - 
randOperationsInPlacepublic MatrixBlock randOperationsInPlace(RandomMatrixGenerator rgen, org.apache.commons.math3.random.Well1024a bigrand, long bSeed, int k) Description copied from class:MatrixBlockFunction to generate a matrix of random numbers. This is invoked both from CP as well as from MR. In case of CP, it generates an entire matrix block-by-block. Abigrandis passed so that block-level seeds are generated internally. In case of MR, it generates a single block for given block-level seedbSeed. When pdf="uniform", cell values are drawn from uniform distribution in range[min,max]. When pdf="normal", cell values are drawn from standard normal distribution N(0,1). The range of generated values will always be (-Inf,+Inf).- Overrides:
- randOperationsInPlacein class- MatrixBlock
- Parameters:
- rgen- random matrix generator
- bigrand- ?
- bSeed- seed value
- k- ?
- Returns:
- matrix block
 
 - 
seqOperationsInPlacepublic MatrixBlock seqOperationsInPlace(double from, double to, double incr) - Overrides:
- seqOperationsInPlacein class- MatrixBlock
 
 - 
getUncompressedpublic static MatrixBlock getUncompressed(MatrixValue mVal) 
 - 
getUncompressedpublic static MatrixBlock getUncompressed(MatrixValue mVal, String message) 
 - 
getUncompressedpublic MatrixBlock getUncompressed() 
 - 
getUncompressedpublic MatrixBlock getUncompressed(String operation) 
 - 
getUncompressedpublic MatrixBlock getUncompressed(String operation, int k) 
 - 
isShallowSerializepublic boolean isShallowSerialize(boolean inclConvert) Description copied from interface:CacheBlockIndicates if the cache block is subject to shallow serialized, which is generally true if in-memory size and serialized size are almost identical allowing to avoid unnecessary deep serialize.- Specified by:
- isShallowSerializein interface- CacheBlock
- Overrides:
- isShallowSerializein class- MatrixBlock
- Parameters:
- inclConvert- if true report blocks as shallow serialize that are currently not amenable but can be brought into an amenable form via- toShallowSerializeBlock.
- Returns:
- true if shallow serialized
 
 - 
toShallowSerializeBlockpublic void toShallowSerializeBlock() Description copied from interface:CacheBlockConverts a cache block that is not shallow serializable into a form that is shallow serializable. This methods has no affect if the given cache block is not amenable.- Specified by:
- toShallowSerializeBlockin interface- CacheBlock
- Overrides:
- toShallowSerializeBlockin class- MatrixBlock
 
 - 
copypublic void copy(MatrixValue thatValue) Description copied from class:MatrixValueCopy that MatrixValue into this MatrixValue. If the MatrixValue is a MatrixBlock evaluate the sparsity of the original matrix, and copy into either a sparse or a dense matrix.- Overrides:
- copyin class- MatrixBlock
- Parameters:
- thatValue- object to copy the values into.
 
 - 
copypublic void copy(MatrixValue thatValue, boolean sp) Description copied from class:MatrixValueCopy that MatrixValue into this MatrixValue. But select sparse destination block depending on boolean parameter.- Overrides:
- copyin class- MatrixBlock
- Parameters:
- thatValue- object to copy the values into.
- sp- boolean specifying if output should be forced sparse or dense. (only applicable if the 'that' is a MatrixBlock)
 
 - 
copyShallowpublic MatrixBlock copyShallow(MatrixBlock that) - Overrides:
- copyShallowin class- MatrixBlock
 
 - 
copypublic void copy(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ)Description copied from class:MatrixBlockIn-place copy of matrix src into the index range of the existing current matrix. Note that removal of existing nnz in the index range and nnz maintenance is only done if 'awareDestNZ=true',- Overrides:
- copyin class- MatrixBlock
- Parameters:
- rl- row lower index, 0-based
- ru- row upper index, 0-based, inclusive
- cl- column lower index, 0-based
- cu- column upper index, 0-based, inclusive
- src- matrix block
- awareDestNZ- true, forces (1) to remove existing non-zeros in the index range of the destination if not present in src and (2) to internally maintain nnz false, assume empty index range in destination and do not maintain nnz (the invoker is responsible to recompute nnz after all copies are done)
 
 - 
getSoftReferenceToDecompressedpublic SoftReference<MatrixBlock> getSoftReferenceToDecompressed() 
 - 
clearSoftReferenceToDecompressedpublic void clearSoftReferenceToDecompressed() 
 - 
getDenseBlockpublic DenseBlock getDenseBlock() - Overrides:
- getDenseBlockin class- MatrixBlock
 
 - 
setDenseBlockpublic void setDenseBlock(DenseBlock dblock) - Overrides:
- setDenseBlockin class- MatrixBlock
 
 - 
getDenseBlockValuespublic double[] getDenseBlockValues() - Overrides:
- getDenseBlockValuesin class- MatrixBlock
 
 - 
getSparseBlockpublic SparseBlock getSparseBlock() - Overrides:
- getSparseBlockin class- MatrixBlock
 
 - 
setSparseBlockpublic void setSparseBlock(SparseBlock sblock) - Overrides:
- setSparseBlockin class- MatrixBlock
 
 - 
getSparseBlockIteratorpublic Iterator<IJV> getSparseBlockIterator() - Overrides:
- getSparseBlockIteratorin class- MatrixBlock
 
 - 
getSparseBlockIteratorpublic Iterator<IJV> getSparseBlockIterator(int rl, int ru) - Overrides:
- getSparseBlockIteratorin class- MatrixBlock
 
 - 
quickSetValuepublic void quickSetValue(int r, int c, double v)- Overrides:
- quickSetValuein class- MatrixBlock
 
 - 
quickGetValueThreadSafepublic double quickGetValueThreadSafe(int r, int c)- Overrides:
- quickGetValueThreadSafein class- MatrixBlock
 
 - 
getValueDenseUnsafepublic double getValueDenseUnsafe(int r, int c)- Overrides:
- getValueDenseUnsafein class- MatrixBlock
 
 - 
appendValuepublic void appendValue(int r, int c, double v)Description copied from class:MatrixBlockAppend value is only used when values are appended at the end of each row for the sparse representation This can only be called, when the caller knows the access pattern of the block- Overrides:
- appendValuein class- MatrixBlock
- Parameters:
- r- row
- c- column
- v- value
 
 - 
appendValuePlainpublic void appendValuePlain(int r, int c, double v)- Overrides:
- appendValuePlainin class- MatrixBlock
 
 - 
appendRowpublic void appendRow(int r, SparseRow row, boolean deep)- Overrides:
- appendRowin class- MatrixBlock
 
 - 
appendRowToSparsepublic void appendRowToSparse(SparseBlock dest, MatrixBlock src, int i, int rowoffset, int coloffset, boolean deep) - Overrides:
- appendRowToSparsein class- MatrixBlock
 
 - 
sortSparseRowspublic void sortSparseRows() Description copied from class:MatrixBlockSorts all existing sparse rows by column indexes.- Overrides:
- sortSparseRowsin class- MatrixBlock
 
 - 
sortSparseRowspublic void sortSparseRows(int rl, int ru)Description copied from class:MatrixBlockSorts all existing sparse rows in range [rl,ru) by column indexes.- Overrides:
- sortSparseRowsin class- MatrixBlock
- Parameters:
- rl- row lower bound, inclusive
- ru- row upper bound, exclusive
 
 - 
minNonZeropublic double minNonZero() Description copied from class:MatrixBlockUtility function for computing the min non-zero value.- Overrides:
- minNonZeroin class- MatrixBlock
- Returns:
- minimum non-zero value
 
 - 
isInSparseFormatpublic boolean isInSparseFormat() Description copied from class:MatrixBlockReturns the current representation (true for sparse).- Overrides:
- isInSparseFormatin class- MatrixBlock
- Returns:
- true if sparse
 
 - 
isUltraSparsepublic boolean isUltraSparse() - Overrides:
- isUltraSparsein class- MatrixBlock
 
 - 
isUltraSparsepublic boolean isUltraSparse(boolean checkNnz) - Overrides:
- isUltraSparsein class- MatrixBlock
 
 - 
isSparsePermutationMatrixpublic boolean isSparsePermutationMatrix() - Overrides:
- isSparsePermutationMatrixin class- MatrixBlock
 
 - 
evalSparseFormatInMemorypublic boolean evalSparseFormatInMemory() Description copied from class:MatrixBlockEvaluates if this matrix block should be in sparse format in memory. Note that this call does not change the representation - for this please call examSparsity.- Overrides:
- evalSparseFormatInMemoryin class- MatrixBlock
- Returns:
- true if matrix block should be in sparse format in memory
 
 - 
evalSparseFormatOnDiskpublic boolean evalSparseFormatOnDisk() Description copied from class:MatrixBlockEvaluates if this matrix block should be in sparse format on disk. This applies to any serialized matrix representation, i.e., when writing to in-memory buffer pool pages or writing to local fs or hdfs.- Overrides:
- evalSparseFormatOnDiskin class- MatrixBlock
- Returns:
- true if matrix block should be in sparse format on disk
 
 - 
examSparsitypublic void examSparsity(boolean allowCSR) Description copied from class:MatrixBlockEvaluates if this matrix block should be in sparse format in memory. Depending on the current representation, the state of the matrix block is changed to the right representation if necessary. Note that this consumes for the time of execution memory for both representations.- Overrides:
- examSparsityin class- MatrixBlock
- Parameters:
- allowCSR- allow CSR format on dense to sparse conversion
 
 - 
sparseToDensepublic void sparseToDense() - Overrides:
- sparseToDensein class- MatrixBlock
 
 - 
mergepublic void merge(MatrixBlock that, boolean appendOnly, boolean par, boolean deep) - Overrides:
- mergein class- MatrixBlock
 
 - 
compactEmptyBlockpublic void compactEmptyBlock() Description copied from interface:CacheBlockFree unnecessarily allocated empty block.- Specified by:
- compactEmptyBlockin interface- CacheBlock
- Overrides:
- compactEmptyBlockin class- MatrixBlock
 
 - 
dropLastRowsOrColumnspublic void dropLastRowsOrColumns(Types.CorrectionLocationType correctionLocation) - Overrides:
- dropLastRowsOrColumnsin class- MatrixBlock
 
 - 
interQuartileMeanpublic double interQuartileMean() - Overrides:
- interQuartileMeanin class- MatrixBlock
 
 - 
pickValuespublic MatrixBlock pickValues(MatrixValue quantiles, MatrixValue ret) - Overrides:
- pickValuesin class- MatrixBlock
 
 - 
pickValuepublic double pickValue(double quantile, boolean average)- Overrides:
- pickValuein class- MatrixBlock
 
 - 
sumWeightForQuantilepublic double sumWeightForQuantile() Description copied from class:MatrixBlockIn a given two column matrix, the second column denotes weights. This function computes the total weight- Overrides:
- sumWeightForQuantilein class- MatrixBlock
- Returns:
- sum weight for quantile
 
 - 
extractTriangularpublic MatrixBlock extractTriangular(MatrixBlock ret, boolean lower, boolean diag, boolean values) - Overrides:
- extractTriangularin class- MatrixBlock
 
 - 
isThreadSafepublic boolean isThreadSafe() Description copied from class:MatrixBlockIndicates if concurrent modifications of disjoint rows are thread-safe.- Overrides:
- isThreadSafein class- MatrixBlock
- Returns:
- true if thread-safe
 
 - 
checkNaNpublic void checkNaN() Description copied from class:MatrixBlockChecks for existing NaN values in the matrix block.- Overrides:
- checkNaNin class- MatrixBlock
 
 - 
initpublic void init(double[][] arr, int r, int c)Description copied from class:MatrixBlockNOTE: This method is designed only for dense representation.- Overrides:
- initin class- MatrixBlock
- Parameters:
- arr- 2d double array matrix
- r- number of rows
- c- number of columns
 
 - 
initpublic void init(double[] arr, int r, int c)Description copied from class:MatrixBlockNOTE: This method is designed only for dense representation.- Overrides:
- initin class- MatrixBlock
- Parameters:
- arr- double array matrix
- r- number of rows
- c- number of columns
 
 - 
isAllocatedpublic boolean isAllocated() - Overrides:
- isAllocatedin class- MatrixBlock
 
 - 
allocateBlockAsyncpublic Future<MatrixBlock> allocateBlockAsync() - Overrides:
- allocateBlockAsyncin class- MatrixBlock
 
 - 
allocateDenseBlockpublic boolean allocateDenseBlock(boolean clearNNZ) - Overrides:
- allocateDenseBlockin class- MatrixBlock
 
 - 
allocateSparseRowsBlockpublic boolean allocateSparseRowsBlock(boolean clearNNZ) - Overrides:
- allocateSparseRowsBlockin class- MatrixBlock
 
 - 
allocateAndResetSparseBlockpublic void allocateAndResetSparseBlock(boolean clearNNZ, SparseBlock.Type stype)- Overrides:
- allocateAndResetSparseBlockin class- MatrixBlock
 
 
- 
 
-