Interface EncodingFactory
public interface EncodingFactory
-
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic IEncodestatic IEncodestatic IEncodecreate(AMapToData d) static IEncodecreate(AMapToData d, AOffset i, int nRow) static IEncodecreateFromMatrixBlock(MatrixBlock m, boolean transposed, int rowCol) Create encoding of a single specific column inside the matrix input.static IEncodecreateFromMatrixBlock(MatrixBlock m, boolean transposed, int rowCol, double[] scaleFactors) Create encoding of a single specific column inside the matrix input.static IEncodecreateFromMatrixBlock(MatrixBlock m, boolean transposed, IColIndex rowCols) Encode a list of columns together from the input matrix, as if it is cocoded.static IEncodecreateFromMatrixBlock(MatrixBlock m, boolean transposed, IColIndex rowCols, double[] scaleFactors) static IEncodecreateFromMatrixBlockDelta(MatrixBlock m, boolean transposed, IColIndex rowCols) Encode a full delta representation of the matrix input taking all rows into account.static IEncodecreateFromMatrixBlockDelta(MatrixBlock m, boolean transposed, IColIndex rowCols, int sampleSize) Encode a delta representation of the matrix input taking the first "sampleSize" rows into account.static SparseEncodingcreateSparse(AMapToData map, AOffset off, int nRows)
-
Field Details
-
LOG
static final org.apache.commons.logging.Log LOG
-
-
Method Details
-
createFromMatrixBlock
Encode a list of columns together from the input matrix, as if it is cocoded.- Parameters:
m- The matrix input to encodetransposed- If the matrix is transposed in memoryrowCols- The list of columns to encode.- Returns:
- An encoded format of the information of the columns.
-
createFromMatrixBlock
static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, IColIndex rowCols, double[] scaleFactors) -
createFromMatrixBlockDelta
Encode a full delta representation of the matrix input taking all rows into account. Note the input matrix should not be delta encoded, but instead while processing, enforcing that we do not allocate more memory.- Parameters:
m- The input matrix that is not delta encoded and should not be modifiedtransposed- If the input matrix is transposed.rowCols- The list of columns to encode- Returns:
- A delta encoded encoding.
-
createFromMatrixBlockDelta
static IEncode createFromMatrixBlockDelta(MatrixBlock m, boolean transposed, IColIndex rowCols, int sampleSize) Encode a delta representation of the matrix input taking the first "sampleSize" rows into account. Note the input matrix should not be delta encoded, but instead while processing, enforcing that we do not allocate more memory.- Parameters:
m- Input matrix that is not delta encoded and should not be modifiedtransposed- If the input matrix is transposed.rowCols- The list of columns to encodesampleSize- The number of rows to consider for the delta encoding (from the beginning)- Returns:
- A delta encoded encoding.
-
createFromMatrixBlock
Create encoding of a single specific column inside the matrix input.- Parameters:
m- The Matrix to encode a column fromtransposed- If the matrix is in transposed format.rowCol- The column index to encode- Returns:
- An encoded format of the information of this column.
-
createFromMatrixBlock
static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, int rowCol, double[] scaleFactors) Create encoding of a single specific column inside the matrix input.- Parameters:
m- The Matrix to encode a column fromtransposed- If the matrix is in transposed format.rowCol- The column index to encodescaleFactors- For quantization-fused compression, scale factors per row, or a single value for entire matrix- Returns:
- An encoded format of the information of this column.
-
create
-
create
-
create
-
create
-
createSparse
-