Package com.qfs.agg

Interface IAggregationBinding

All Known Subinterfaces:
IAggregateStoreBinding
All Known Implementing Classes:
AAggregateStoreBinding, AAggregationBinding, AAggregationBindingCloneable, AMultiSourceAggregationBindingCloneable, AMultiSourceVectorAggregationBinding, AVectorAggregationBinding, ComparableMaxFunction.ArgMaxBinding, CopyFunction.CopyBindingBoolean, CopyFunction.CopyBindingDouble, CopyFunction.CopyBindingFloat, CopyFunction.CopyBindingInt, CopyFunction.CopyBindingLong, CopyFunction.CopyBindingObject, CopyFunction.CopyBindingVector, CountFunction.CountBinding, GrossSumFunction.GrossSumBindingVector, HistoryAggregation.HistoryBinding, LongFunction.LongBindingVector, MaxFunction.MaxBindingDouble, MaxFunction.MaxBindingDoubleNullable, MaxFunction.MaxBindingFloat, MaxFunction.MaxBindingFloatNullable, MaxFunction.MaxBindingInt, MaxFunction.MaxBindingIntNullable, MaxFunction.MaxBindingLong, MaxFunction.MaxBindingLongNullable, MaxFunction.MaxBindingObject, MinFunction.MinBindingDouble, MinFunction.MinBindingDoubleNullable, MinFunction.MinBindingFloat, MinFunction.MinBindingFloatNullable, MinFunction.MinBindingInt, MinFunction.MinBindingIntNullable, MinFunction.MinBindingLong, MinFunction.MinBindingLongNullable, MinFunction.MinBindingObject, NoOpAggregateStoreBinding, ShortFunction.ShortBindingVector, SingleValueFunction.SingleValueBindingArrayObject, SingleValueFunction.SingleValueBindingBoolean, SingleValueFunction.SingleValueBindingDouble, SingleValueFunction.SingleValueBindingDoubleNullable, SingleValueFunction.SingleValueBindingFloat, SingleValueFunction.SingleValueBindingFloatNullable, SingleValueFunction.SingleValueBindingInteger, SingleValueFunction.SingleValueBindingIntNullable, SingleValueFunction.SingleValueBindingLong, SingleValueFunction.SingleValueBindingLongNullable, SingleValueFunction.SingleValueBindingObject, SquareSumFunction.SquareSumBindingDouble, SquareSumFunction.SquareSumBindingDoubleNullable, SquareSumFunction.SquareSumBindingFloat, SquareSumFunction.SquareSumBindingFloatNullable, SquareSumFunction.SquareSumBindingLong, SquareSumFunction.SquareSumBindingLongNullable, SumFunction.SumBindingDouble, SumFunction.SumBindingDoubleNullable, SumFunction.SumBindingFloat, SumFunction.SumBindingFloatNullable, SumFunction.SumBindingInt, SumFunction.SumBindingIntNullable, SumFunction.SumBindingLong, SumFunction.SumBindingLongNullable, SumProductFunction.SumProductBindingDouble, SumProductFunction.SumProductBindingDoubleNullable, SumProductFunction.SumProductBindingFloat, SumProductFunction.SumProductBindingFloatNullable, SumProductFunction.SumProductBindingLong, SumProductFunction.SumProductBindingLongNullable, SumProductFunction.SumProductBindingVectorDouble, SumProductFunction.SumProductBindingVectorFloat, SumProductFunction.SumProductBindingVectorLong, SumVectorAggregationBinding, TimestampBinding, TimestampBindingLong, UserDefinedAggregationBinding, UserDefinedAggregationFeedBinding, UserDefinedAggregationWithRemovalFeedBinding, UserDefinedVectorAggregationBinding, UserDefinedVectorAggregationFeedBinding, UserDefinedVectorAggregationWithRemovalFeedBinding

public interface IAggregationBinding
Aggregation binding between two data structures of type 'array': the source and the destination. The elements of the source array can be aggregated into the elements of the destination array.

The binding provides means to copy, aggregate and disaggregate data from the source and into the destination.

Author:
ActiveViam
  • Method Summary

    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 Details

    • 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