I rebased the previous patch after it was marked as "Need rebase"
I also initialized the 'elem_cost' array to all 'true' values to
simplify the code and avoid confusion, and rewrote
accum_scalararray_prob() to improve readability.
--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/