* This routine allocates memory to hold a simple prototype * data structure, i.e. one without independent distributions * and variances for each dimension. * @param N number of dimensions * @param Cluster cluster to be made into a prototype * @return Pointer to new simple prototype * @note Exceptions: None * @note History: 6/19/89, DSJ, Created. */
| 1604 | * @note History: 6/19/89, DSJ, Created. |
| 1605 | */ |
| 1606 | PROTOTYPE *NewSimpleProto(inT16 N, CLUSTER *Cluster) { |
| 1607 | PROTOTYPE *Proto; |
| 1608 | int i; |
| 1609 | |
| 1610 | Proto = (PROTOTYPE *) Emalloc (sizeof (PROTOTYPE)); |
| 1611 | Proto->Mean = (FLOAT32 *) Emalloc (N * sizeof (FLOAT32)); |
| 1612 | |
| 1613 | for (i = 0; i < N; i++) |
| 1614 | Proto->Mean[i] = Cluster->Mean[i]; |
| 1615 | Proto->Distrib = NULL; |
| 1616 | |
| 1617 | Proto->Significant = TRUE; |
| 1618 | Proto->Merged = FALSE; |
| 1619 | Proto->Style = spherical; |
| 1620 | Proto->NumSamples = Cluster->SampleCount; |
| 1621 | Proto->Cluster = Cluster; |
| 1622 | Proto->Cluster->Prototype = TRUE; |
| 1623 | return (Proto); |
| 1624 | } // NewSimpleProto |
| 1625 | |
| 1626 | /** |
| 1627 | * This routine returns TRUE if the specified covariance |
no test coverage detected