Class ACLAScheme

    • Method Detail

      • encode

        public final AColGroup encode​(MatrixBlock data)
        Description copied from interface: ICLAScheme
        Encode the given matrix block into the scheme provided in the instance. The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.
        Specified by:
        encode in interface ICLAScheme
        Parameters:
        data - The data to encode
        Returns:
        A compressed column group forced to use the scheme provided.
      • encode

        public final AColGroup encode​(MatrixBlock data,
                                      IColIndex columns)
        Description copied from interface: ICLAScheme
        Encode a given matrix block into the scheme provided in the instance but overwrite what columns to use. The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.
        Specified by:
        encode in interface ICLAScheme
        Parameters:
        data - The data to encode
        columns - The columns to apply the scheme to, but must be of same number than the encoded scheme
        Returns:
        A compressed column group forced to use the scheme provided.
      • encodeT

        public final AColGroup encodeT​(MatrixBlock data)
        Description copied from interface: ICLAScheme
        Encode the given matrix block into the scheme provided in the instance, the input data is transposed The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.
        Specified by:
        encodeT in interface ICLAScheme
        Parameters:
        data - The transposed data to encode
        Returns:
        A compressed column group forced to use the scheme provided.
      • encodeT

        public final AColGroup encodeT​(MatrixBlock data,
                                       IColIndex columns)
        Description copied from interface: ICLAScheme
        Encode a given matrix block into the scheme provided in the instance but overwrite what columns to use. The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.
        Specified by:
        encodeT in interface ICLAScheme
        Parameters:
        data - The transposed data to encode
        columns - The columns to apply the scheme to, but must be of same number than the encoded scheme
        Returns:
        A compressed column group forced to use the scheme provided.
      • update

        public final ICLAScheme update​(MatrixBlock data)
        Description copied from interface: ICLAScheme
        Update the encoding scheme to enable compression of the given data.
        Specified by:
        update in interface ICLAScheme
        Parameters:
        data - The data to update into the scheme
        Returns:
        A updated scheme
      • update

        public final ICLAScheme update​(MatrixBlock data,
                                       IColIndex columns)
        Description copied from interface: ICLAScheme
        Update the encoding scheme to enable compression of the given data.
        Specified by:
        update in interface ICLAScheme
        Parameters:
        data - The data to update into the scheme
        columns - The columns to extract the data from
        Returns:
        A updated scheme
      • updateT

        public final ICLAScheme updateT​(MatrixBlock data)
        Description copied from interface: ICLAScheme
        Update the encoding scheme to enable compression of the given data.
        Specified by:
        updateT in interface ICLAScheme
        Parameters:
        data - The transposed data to update into the scheme
        Returns:
        A updated scheme
      • updateT

        public final ICLAScheme updateT​(MatrixBlock data,
                                        IColIndex columns)
        Description copied from interface: ICLAScheme
        Update the encoding scheme to enable compression of the given data.
        Specified by:
        updateT in interface ICLAScheme
        Parameters:
        data - The transposed data to update into the scheme
        columns - The columns to extract the data from
        Returns:
        A updated scheme
      • updateAndEncode

        public final Pair<ICLAScheme,​AColGroup> updateAndEncode​(MatrixBlock data)
        Description copied from interface: ICLAScheme
        Update and encode the given block in a single pass. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.
        Specified by:
        updateAndEncode in interface ICLAScheme
        Parameters:
        data - The block to encode
        Returns:
        The updated scheme and an encoded column group
      • updateAndEncodeT

        public final Pair<ICLAScheme,​AColGroup> updateAndEncodeT​(MatrixBlock data)
        Description copied from interface: ICLAScheme
        Update and encode the given block in a single pass. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.
        Specified by:
        updateAndEncodeT in interface ICLAScheme
        Parameters:
        data - The transposed block to encode
        Returns:
        The updated scheme and an encoded column group
      • updateAndEncode

        public final Pair<ICLAScheme,​AColGroup> updateAndEncode​(MatrixBlock data,
                                                                      IColIndex columns)
        Description copied from interface: ICLAScheme
        Try to update and encode in a single pass over the data. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.
        Specified by:
        updateAndEncode in interface ICLAScheme
        Parameters:
        data - The block to encode
        columns - The column to encode
        Returns:
        The updated scheme and an encoded column group
      • updateAndEncodeT

        public final Pair<ICLAScheme,​AColGroup> updateAndEncodeT​(MatrixBlock data,
                                                                       IColIndex columns)
        Description copied from interface: ICLAScheme
        Try to update and encode in a single pass over the data. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.
        Specified by:
        updateAndEncodeT in interface ICLAScheme
        Parameters:
        data - The transposed block to encode
        columns - The column to encode
        Returns:
        The updated scheme and an encoded column group