next up previous contents
Next: Effect and Restrictions Up: The Java Adlib API Previous: Effect and Restrictions   Contents


A count() method is a boolean reduction operation for counting the number of true elements in a distributed array of boolean values. This method returns true if and only if count element of source is true. The prototype is

$\displaystyle \begin{minipage}[t]{\linewidth}\small\begin{tabbing}
\verb$ boolean count (boolean  ...

where the notation boolean # means a multiarray of arbitrary rank with elements of type boolean. The count method is implemented by a schedule object with HPspmd class Count. This class has a constructor with arguments identical to the method above, and has one public method with no arguments called execute(), which executes the schedule. The effective public interface of the Count class is

$\displaystyle \begin{minipage}[t]{\linewidth}\small\verb$ public class Count im...
...public int execute () { ... }$\\
\verb$ . . .$\\
\verb$ }$

The source array is source. It will have elements of type boolean.


Bryan Carpenter 2004-06-09