- Parameters
-
source | The input dataset. The index of the dimensions in result must match the index of the dimensions in array. |
reduceRange | The range of the input dataset that we are interested in reducing. |
result | The result dataset. The dimensions of this dataset must have the same names as those in range, but it should be missing the dimensions that are being reduced - these will not be required in the output dataset (they are being reduced to a single value). |
reduce | The function for reducing the array into the result set. |
- Template Parameters
-
T | The datatype that the operation is going to function on (usually double) |
ReduceFunction | The type of functor to use. |
This function will iterate over all of the cells in the result set, reducing the corresponding ranges in the input array into it, using the input function. One example of a use for this function is to compress a dimension down to one by averaging all the values.
This function will only reduce those dimensions that are listed in the reduceRange.
- Precondition
- result has already been resized and given the appropriate output dimensions.