Integer Buckets

Description

Transforms the value of an integer property into the bucket it belongs to. Buckets are defined as integer ranges of a given size. For example, with values [0,2,3,9,10,12,50,70] and bucket size 10, the following buckets are created:

  1. [0,2,3,9]
  2. [10,12]
  3. [50]
  4. [70]

Input

  • SOURCE [OBJ,INTEGER]: a list of objects, with an associated integer value

Output

  • RESULT [OBJ,INTEGER]: objects with transformed integer

Parameters

  • Bucket size: for each input integer i, the resulting bucket identifier is given by i / Bucket size