public abstract class ColGroup extends Object implements Serializable
| Modifier and Type | Class and Description | 
|---|---|
| static class  | ColGroup.CompressionTypePublic Group types supported
 
 Note For instance DDC is called DDC not DDC1, or DDC2 which is a specific subtype of the DDC. | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract void | countNonZerosPerRow(int[] rnnz,
                   int rl,
                   int ru)Count the number of non-zeros per row | 
| abstract void | decompressToBlock(MatrixBlock target,
                 int colpos)Decompress to block. | 
| abstract void | decompressToBlock(MatrixBlock target,
                 int[] colIndexTargets)Decompress the contents of this column group into uncompressed packed columns | 
| abstract void | decompressToBlock(MatrixBlock target,
                 int rl,
                 int ru)Decompress the contents of this column group into the specified full matrix block. | 
| abstract long | estimateInMemorySize()Note: Must be overridden by child classes to account for additional data and metadata | 
| abstract double | get(int r,
   int c)Get the value at a global row/column position. | 
| int | getColIndex(int colNum)Obtain a column index value. | 
| int[] | getColIndices()Obtain the offsets of the columns in the matrix block that make up the group | 
| abstract ColGroup.CompressionType | getCompType()Obtain the compression type. | 
| abstract long | getExactSizeOnDisk()Returns the exact serialized size of column group. | 
| abstract boolean | getIfCountsType()Returns true if in the getValuesAsBlock method returns values in groups (that needs to be counted) or
 individually potentially repeated values | 
| abstract Iterator<IJV> | getIterator(int rl,
           int ru,
           boolean inclZeros,
           boolean rowMajor)Create a column group iterator for a row index range. | 
| int | getNumCols()Obtain the number of columns in this column group. | 
| int | getNumRows()Get number of rows contained in the ColGroup. | 
| abstract org.apache.sysds.runtime.compress.colgroup.ColGroup.ColGroupRowIterator | getRowIterator(int rl,
              int ru)Create a dense row iterator for a row index range. | 
| abstract double[] | getValues()Get all the values in the colGroup. | 
| abstract MatrixBlock | getValuesAsBlock()Returns the ColGroup as a MatrixBlock. | 
| abstract boolean | isLossy()Is Lossy | 
| abstract void | leftMultByMatrix(double[] matrix,
                double[] result,
                int numVals,
                double[] values,
                int numRows,
                int numCols,
                int rl,
                int ru,
                int vOff)Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
 column vector is assumed to be transposed already i.e. | 
| abstract void | leftMultByRowVector(double[] vector,
                   double[] result,
                   int numVals)Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
 column vector is assumed to be transposed already i.e. | 
| abstract void | leftMultByRowVector(double[] vector,
                   double[] result,
                   int numVals,
                   double[] values)Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
 column vector is assumed to be transposed already i.e. | 
| abstract void | readFields(DataInput in)Deserialize column group from data input. | 
| abstract void | rightMultByMatrix(double[] matrix,
                 double[] result,
                 int numVals,
                 double[] values,
                 int rl,
                 int ru,
                 int vOff) | 
| abstract void | rightMultByVector(double[] vector,
                 double[] c,
                 int rl,
                 int ru,
                 double[] dictVals)Multiply the slice of the matrix that this column group represents by a vector on the right. | 
| abstract ColGroup | scalarOperation(ScalarOperator op)Perform the specified scalar operation directly on the compressed column group, without decompressing individual
 cells if possible. | 
| void | shiftColIndices(int offset) | 
| abstract void | unaryAggregateOperations(AggregateUnaryOperator op,
                        double[] c)Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed
 matrix. | 
| abstract void | unaryAggregateOperations(AggregateUnaryOperator op,
                        double[] c,
                        int rl,
                        int ru)Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed
 matrix. | 
| abstract void | write(DataOutput out)Serializes column group to data output. | 
public int[] getColIndices()
public int getColIndex(int colNum)
colNum - column numberpublic int getNumRows()
public int getNumCols()
public abstract ColGroup.CompressionType getCompType()
public void shiftColIndices(int offset)
public abstract long estimateInMemorySize()
public abstract void decompressToBlock(MatrixBlock target, int rl, int ru)
target - a matrix block where the columns covered by this column group have not yet been filled in.rl - row lowerru - row upperpublic abstract void decompressToBlock(MatrixBlock target, int[] colIndexTargets)
target - a dense matrix block. The block must have enough space to hold the contents of this column
                        group.colIndexTargets - array that maps column indices in the original matrix block to columns of target.public abstract void decompressToBlock(MatrixBlock target, int colpos)
target - dense output vectorcolpos - column to decompress, error if larger or equal numColspublic abstract void write(DataOutput out) throws IOException
out - data outputIOException - if IOException occurspublic abstract void readFields(DataInput in) throws IOException
in - data inputIOException - if IOException occurspublic abstract long getExactSizeOnDisk()
public abstract double get(int r,
                           int c)
r - rowc - columnpublic abstract double[] getValues()
public abstract MatrixBlock getValuesAsBlock()
public abstract boolean getIfCountsType()
public abstract void rightMultByVector(double[] vector,
                                       double[] c,
                                       int rl,
                                       int ru,
                                       double[] dictVals)
vector - vector to multiply by (tall vector)c - accumulator for holding the resultrl - row lowerru - row upper if the internal SystemML code that performs the multiplication experiences an errordictVals - The dictionary values materializedpublic abstract void rightMultByMatrix(double[] matrix,
                                       double[] result,
                                       int numVals,
                                       double[] values,
                                       int rl,
                                       int ru,
                                       int vOff)
public abstract void leftMultByRowVector(double[] vector,
                                         double[] result,
                                         int numVals)
vector - row vectorresult - matrix block resultnumVals - The Number of values contained in the Column.public abstract void leftMultByRowVector(double[] vector,
                                         double[] result,
                                         int numVals,
                                         double[] values)
vector - row vectorresult - matrix block resultnumVals - The Number of values contained in the Column.values - The materialized list of values contained in the dictionary.public abstract void leftMultByMatrix(double[] matrix,
                                      double[] result,
                                      int numVals,
                                      double[] values,
                                      int numRows,
                                      int numCols,
                                      int rl,
                                      int ru,
                                      int vOff)
matrix - matrix to left multiplyresult - matrix block resultnumVals - The Number of values contained in the Column.values - The materialized list of values contained in the dictionary.numRows - The number of rows in the matrix inputnumCols - The number of columns in the colGroups parent matrix.rl - The row to start the matrix multiplication fromru - The row to stop the matrix multiplication at.vOff - The offset into the first argument matrix to start at.public abstract ColGroup scalarOperation(ScalarOperator op)
op - operation to performpublic abstract void unaryAggregateOperations(AggregateUnaryOperator op, double[] c)
op - The operator usedc - Rhe output matrix block.public abstract void unaryAggregateOperations(AggregateUnaryOperator op, double[] c, int rl, int ru)
op - The operator usedc - The output matrix block.rl - The Starting Row to do aggregation fromru - The last Row to do aggregation to (not included)public abstract Iterator<IJV> getIterator(int rl, int ru, boolean inclZeros, boolean rowMajor)
rl - row lower index, inclusiveru - row upper index, exclusiveinclZeros - include zero values into scope of iteratorrowMajor - use a row major iteration orderpublic abstract org.apache.sysds.runtime.compress.colgroup.ColGroup.ColGroupRowIterator getRowIterator(int rl,
                                                                                                       int ru)
rl - row lower index, inclusiveru - row upper index, exclusivepublic abstract void countNonZerosPerRow(int[] rnnz,
                                         int rl,
                                         int ru)
rnnz - non-zeros per rowrl - row lower bound, inclusiveru - row upper bound, exclusivepublic abstract boolean isLossy()
Copyright © 2020 The Apache Software Foundation. All rights reserved.