Ticket #35 (closed feature request: fixed)
|Reported by:||blever||Owned by:||chak|
The scan/fold functions defined within the Accelerate language are all of the exclusive type. That is, they all require the specification of an "identity".
In some cases it can be difficult to specify the identity value. For example, performing a fold over an array of positive Floats where the fold operator is "min" requires that the identity value be positive infinity (in the general case). In some cases, it may be possible to determine a maximum value that thee array may possibly contain. In the general case, however, a better solution would be to have no "identity" value and instead use the first array element value as the identity - that is, an inclusive fold.
Inclusive versions could be created for scanl, scanr, fold and foldSeg.