code: private void decompose(int scalar, int[] decomposed)
          {
              for (int i = 0 ; i < decomposed.length ; i++)
              {
                  int avg = generator.clusteringDescendantAverages[i];
                  decomposed[i] = scalar / avg;
                  scalar %= avg;
              }
              for (int i = lastRow.length - 1 ; i > 0 ; i--)
              {
                  int avg = generator.clusteringComponentAverages[i];
                  if (decomposed[i] >= avg)
                  {
                      decomposed[i - 1] += decomposed[i] / avg;
                      decomposed[i] %= avg;
                  }
              }
          }
docs: Translate the scalar position into a tiered position based on mean expected counts
  @param scalar scalar position
  @param decomposed target container