Package org.apache.sysds.runtime.frame.data.lib

# Class MatrixBlockFromFrame

java.lang.Object
org.apache.sysds.runtime.frame.data.lib.MatrixBlockFromFrame

public class MatrixBlockFromFrame extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`blocksizeIJ`
`static final org.apache.commons.logging.Log`
`LOG`
`static Boolean`
`WARNED_FOR_FAILED_CAST`

## Method Summary

Modifier and Type
Method
Description
`static MatrixBlock`
`convertToMatrixBlock(FrameBlock frame, int k)`
Converts a frame block with arbitrary schema into a matrix block.
`static MatrixBlock`
`convertToMatrixBlock(FrameBlock frame, MatrixBlock ret, int k)`
Converts a frame block with arbitrary schema into a matrix block.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### LOG

public static final org.apache.commons.logging.Log LOG

### blocksizeIJ

public static final int blocksizeIJ

See Also:
  - Constant Field Values

### WARNED_FOR_FAILED_CAST

public static Boolean WARNED_FOR_FAILED_CAST

## Method Details

### convertToMatrixBlock

public static MatrixBlock convertToMatrixBlock(FrameBlock frame, int k)
Converts a frame block with arbitrary schema into a matrix block. Since matrix block only supports value type double, we do a best effort conversion of non-double types which might result in errors for non-numerical data.

Parameters:
  `frame` - Frame block to convert
  `k` - The parallelization degree
Returns:
  MatrixBlock

### convertToMatrixBlock

public static MatrixBlock convertToMatrixBlock(FrameBlock frame, MatrixBlock ret, int k)
Converts a frame block with arbitrary schema into a matrix block. Since matrix block only supports value type double, we do a best effort conversion of non-double types which might result in errors for non-numerical data.

Parameters:
  `frame` - FrameBlock to convert
  `ret` - The returned MatrixBlock
  `k` - The parallelization degree
Returns:
  MatrixBlock