next up previous contents
Next: Array Arguments Up: Arrays Previous: Maximum and Minimum Intrinsics   Contents

Array Reduction Intrinsics

Reduction functions act on a rank r array A, and return a result of a smaller rank. If the argument DIM is absent the result is a scalar, if DIM is present the result is an array of rank r-1.

 SUM(A [,DIM=d] [,MASK=m]) returns the sum of array elements, along an optionally specified dimension under an optionally specified mask.

 SUM(A [,DIM=d] [,MASK=m]) returns the sum of array elements, along an optionally specified dimension under an optionally specified mask.

 PRODUCT(A [,DIM=d] [,MASK=m]) returns the product of array elements, along an optionally specified dimension under an optionally specified mask.

 ALL(MASK [,DIM=d]) returns .TRUE. if all entries in the logical array MASK are .TRUE.; the operation can be performed along a certain dimension. (Note: returns .TRUE. for zero-sized arrays)

 ANY(MASK [,DIM=d]) returns .TRUE. if at least one entry in the logical array MASK is .TRUE.; the operation can be performed along a certain dimension. (Note: returns .FALSE. for zero-sized arrays)

 COUNT(MASK [,DIM=d]) returns the number of .TRUE. elements in the logical array MASK; the operation can be performed along a certain dimension. (Note: returns 0 for zero-sized arrays)






next up previous contents
Next: Array Arguments Up: Arrays Previous: Maximum and Minimum Intrinsics   Contents
Adrian Sandu 2001-08-26