Package com.qfs.agg

Interface IAggregationBinding

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void aggregate​(int[] mapping, int length)
      Performs the aggregate(int, int) in bulk.
      void aggregate​(int from, int to)
      Aggregates an element of the source into an aggregate of the destination structure.
      default void copy​(int[] mapping, int length)
      Performs the copy(int, int) in bulk.
      void copy​(int from, int to)
      Copies one element of the source into the destination structure, overriding the eventual aggregate that was previously found in the destination array.
      void disaggregate​(int from, int to)
      Disaggregates an element of the source from an aggregate of the destination structure.
    • Method Detail

      • copy

        void copy​(int from,
                  int to)
        Copies one element of the source into the destination structure, overriding the eventual aggregate that was previously found in the destination array.
        Parameters:
        from - position of the source element
        to - position of the destination element
      • copy

        default void copy​(int[] mapping,
                          int length)
        Performs the copy(int, int) in bulk.

        A batch is described with an array of 2*n slots. For a given 0 <= index < n in this array, this method will perform copy(2 * index, 2 * index + 1).

        Parameters:
        mapping - description of the batch, by (source, destination) pairs.
        length - number of mappings to consider in the copy (starting at zero)
      • aggregate

        void aggregate​(int from,
                       int to)
        Aggregates an element of the source into an aggregate of the destination structure.
        Parameters:
        from - position of the source element
        to - position of the destination element
      • aggregate

        default void aggregate​(int[] mapping,
                               int length)
        Performs the aggregate(int, int) in bulk.

        A batch is described with an array of 2*n slots. For a given 0 <= index < n in this array, this method will perform aggregate(2 * index, 2 * index + 1).

        Parameters:
        mapping - description of the batch, by (source, destination) pairs.
        length - number of mappings to consider in the copy (starting at zero)
      • disaggregate

        void disaggregate​(int from,
                          int to)
        Disaggregates an element of the source from an aggregate of the destination structure.

        It is the responsibility of the caller to ensure that the disaggregated element was aggregated at that position beforehand. This IAggregationBinding is responsible for aggregating with performance in mind, but it's not responsible for data coherence.

        Parameters:
        from - position of the source element
        to - position of the destination element