Skip to main content

Sum Array

An STSumArray is an array of integer values and a cached sum. It can be sampled from directly, but it's recommended to pre-compute into a Sum Tree or Alias Table because they will be much faster.

Sum Arrays come with built-in customizations in property editor windows, showing the probability for each item:

Functions for sum arrays are exposed to blueprints under the namespace 'Stoch.Utils.SumArray'.