Interface EncodingFactory
-
public interface EncodingFactory
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.logging.Log
LOG
-
Method Summary
Static Methods Modifier and Type Method Description static IEncode
create(ColGroupConst c)
static IEncode
create(ColGroupEmpty c)
static IEncode
create(AMapToData d)
static IEncode
create(AMapToData d, AOffset i, int nRow)
static IEncode
createFromMatrixBlock(MatrixBlock m, boolean transposed, int rowCol)
Create encoding of a single specific column inside the matrix input.static IEncode
createFromMatrixBlock(MatrixBlock m, boolean transposed, IColIndex rowCols)
Encode a list of columns together from the input matrix, as if it is cocoded.static IEncode
createFromMatrixBlockDelta(MatrixBlock m, boolean transposed, IColIndex rowCols)
Encode a full delta representation of the matrix input taking all rows into account.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.static SparseEncoding
createSparse(AMapToData map, AOffset off, int nRows)
-
-
-
Method Detail
-
createFromMatrixBlock
static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, IColIndex rowCols)
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.
-
createFromMatrixBlockDelta
static IEncode createFromMatrixBlockDelta(MatrixBlock m, boolean transposed, IColIndex rowCols)
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
static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, int rowCol)
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.
-
create
static IEncode create(ColGroupConst c)
-
create
static IEncode create(ColGroupEmpty c)
-
create
static IEncode create(AMapToData d)
-
create
static IEncode create(AMapToData d, AOffset i, int nRow)
-
createSparse
static SparseEncoding createSparse(AMapToData map, AOffset off, int nRows)
-
-