* This routine is used to find all of the samples which * belong to a cluster. It starts by removing the top * cluster on the cluster list (SearchState). If this cluster is * a leaf it is returned. Otherwise, the right subcluster * is pushed on the list and we continue the search in the * left subcluster. This continues until a leaf is found. * If all samples have been found, NULL is ret
| 624 | * @note History: 6/16/89, DSJ, Created. |
| 625 | */ |
| 626 | CLUSTER *NextSample(LIST *SearchState) { |
| 627 | CLUSTER *Cluster; |
| 628 | |
| 629 | if (*SearchState == NIL_LIST) |
| 630 | return (NULL); |
| 631 | Cluster = (CLUSTER *) first_node (*SearchState); |
| 632 | *SearchState = pop (*SearchState); |
| 633 | while (TRUE) { |
| 634 | if (Cluster->Left == NULL) |
| 635 | return (Cluster); |
| 636 | *SearchState = push (*SearchState, Cluster->Right); |
| 637 | Cluster = Cluster->Left; |
| 638 | } |
| 639 | } // NextSample |
| 640 | |
| 641 | /** |
| 642 | * This routine returns the mean of the specified |
no test coverage detected