get.N.CLASS: Obtain Total Elements for Every Clusters
Description
This function will collect the total elements for every clusters
from all processors that the all reduced calls with the sum operation
will be performed.
The get.CLASS returns class ids.
Usage
get.N.CLASS(K)
get.CLASS(PARAM)
Arguments
K
the total number of clusters.
PARAM
a set of parameters.
Value
K numbers will be returned that are the total elements for each
cluster. Sum of these K numbers should be equal to N the
total number of observations.
Details
The final results are distributed in all processors including the total
elements for each cluster. The global variable CLASS.spmd
stores the identification for each observation on each processors.
This function will first summary CLASS.spmd
in K categories,
then use the all reduce function with the sum operation to add the numbers
by clusters.
The COMM.RANK 0 will be used to take care the printing.