Package com.qfs.chunk

Interface IChunkFloat

    • Method Detail

      • getBindingType

        default int getBindingType()
        Description copied from interface: IChunk
        Gets the type for binding transfers of this chunk.
        Specified by:
        getBindingType in interface IChunk<Float>
        Returns:
        the physical type like Types.PHYSICAL_INT, etc
      • writeFromCell

        default void writeFromCell​(int position,
                                   IReadableCell cell)
        Description copied from interface: IChunk
        Writes the content of the cell into the chunk at the given position.

        It is up to chunks to use the appropriate read method to avoid boxing as much as possible.

        Specified by:
        writeFromCell in interface IChunk<Float>
      • fill

        default void fill​(float value)
        Fills all slots in the chunk with the same value.
        Parameters:
        value - the value to fill the chunk with
      • equals

        boolean equals​(int position,
                       float value)
        Tests if the record stored at that position is equal to a value.
        Parameters:
        position - the position to read
        value - the value to compare
        Returns:
        true if the read value is the same as the given value, false otherwise
      • read

        Float read​(int position)
        Description copied from interface: IChunk
        Returns the data stored at that position in the chunk.
        Specified by:
        read in interface IArrayReader
        Specified by:
        read in interface IChunk<Float>
        Parameters:
        position - the position in the chunk at which to read
        Returns:
        the data stored at that position in the chunk
      • readFloat

        float readFloat​(int position)
        Description copied from interface: IArrayReader
        Reads a float primitive value from the array.

        An exception is thrown if the value is not of the right type.

        Specified by:
        readFloat in interface IArrayReader
        Parameters:
        position - 0-based index in an array
        Returns:
        float value
      • readDouble

        double readDouble​(int position)
        Description copied from interface: IArrayReader
        Reads a double primitive value from the array.

        An exception is thrown if the value is not of the right type.

        Specified by:
        readDouble in interface IArrayReader
        Parameters:
        position - 0-based index in an array
        Returns:
        double value
      • write

        void write​(int position,
                   Object value)
        Description copied from interface: IArrayWriter
        Writes a piece of data at a position in the array.

        For better performance, use the primitive type operations.

        Specified by:
        write in interface IArrayWriter
        Parameters:
        position - 0-based index in the array
        value - the value to write
      • writeInt

        void writeInt​(int position,
                      int value)
        Description copied from interface: IArrayWriter
        Writes an int primitive value in the array.
        Specified by:
        writeInt in interface IArrayWriter
        Parameters:
        position - 0-based index in the array
        value - the value to write
      • writeLong

        void writeLong​(int position,
                       long value)
        Description copied from interface: IArrayWriter
        Writes a long primitive value in the array.
        Specified by:
        writeLong in interface IArrayWriter
        Parameters:
        position - 0-based index in the array
        value - the value to write
      • writeFloat

        void writeFloat​(int position,
                        float value)
        Description copied from interface: IArrayWriter
        Writes a float primitive value in the array.
        Specified by:
        writeFloat in interface IArrayWriter
        Parameters:
        position - 0-based index in the array
        value - the value to write
      • copyInto

        default void copyInto​(int position,
                              IWritableCell cell)
        Description copied from interface: IChunk
        Copies the value at a given position in this chunk into the provided cell.
        Specified by:
        copyInto in interface IChunk<Float>
        Parameters:
        position - row of the chunk to read
      • transfer

        default void transfer​(IWritableTable destination,
                              int destinationColumn,
                              int[] rowsMapping,
                              int numRows)
        Description copied from interface: IChunk
        Transfers a given number of rows from this chunk to target rows in the given column of the destination table.

        The mapping from the source rows to the target rows is described with an array of 2*n slots. Each even slot contains the index of the row to be copied from the source chunk and the following odd slot contains the index of the row into which the source data will be transferred.

        Specified by:
        transfer in interface IChunk<Float>
        Parameters:
        destination - the destination table
        destinationColumn - the column to transfer the data to in the destination table
        rowsMapping - the mapping from source rows to target rows, as explained above
        numRows - the number of rows to transfer
      • createFrequentValueChunk

        default IFrequentValueChunk<Float> createFrequentValueChunk​(int chunkSize,
                                                                    Float frequentValue,
                                                                    IChunk<Float> underlyingChunk,
                                                                    IRowMapping mapping,
                                                                    boolean hasNullValues)
        Description copied from interface: IChunk
        Creates a compressed version of this chunk using frequency compression.
        Specified by:
        createFrequentValueChunk in interface IChunk<Float>
        Parameters:
        chunkSize - visible size of the compressed chunk
        underlyingChunk - underlying chunk containing values different from the frequent value
        mapping - mapping liking visible rows to each non-frequent value
        hasNullValues - flag indicating if the underlying chunk contains null values.
        See Also:
        IFrequentValueChunk