Operators |
tuple_cumul — Calculate the cumulative sums of a tuple.
tuple_cumul returns the different cumulative sums of the corresponding elements of the input tuple Tuple, i.e. the i-th element of the result tuple Cumul is the sum of the first i elements of the input tuple Tuple. For example, if Tuple contains the values [1,2,3,4], the output tuple Cumul will contain the values [1,3,6,10]. All elements of Tuple must be numbers (integer or floating point numbers). Each element of the result tuple Cumul will contain a floating point number if at least one element of the calculation is a floating point number. If all elements of the calculation are integer numbers the resulting sum in Cumul will also be an integer number.
If the input tuple is empty, the operator returns an empty tuple.
HDevelop provides an in-line operation for tuple_cumul , which can be used in an expression in the following syntax:
Input tuple.
Cumulative sum of the corresponding tuple elements.
tuple_min2, tuple_max2, tuple_add
Foundation
Operators |