* This routine creates a mixed prototype data structure to * approximate the samples in the specified cluster. * Mixed prototypes can have different distributions for * each dimension. All dimensions are independent. The * structure is initially filled in as though it were an * elliptical prototype. The actual distributions of the * dimensions can be altered by other routines. * @param N
| 1580 | * @note History: 6/19/89, DSJ, Created. |
| 1581 | */ |
| 1582 | PROTOTYPE *NewMixedProto(inT16 N, CLUSTER *Cluster, STATISTICS *Statistics) { |
| 1583 | PROTOTYPE *Proto; |
| 1584 | int i; |
| 1585 | |
| 1586 | Proto = NewEllipticalProto (N, Cluster, Statistics); |
| 1587 | Proto->Distrib = (DISTRIBUTION *) Emalloc (N * sizeof (DISTRIBUTION)); |
| 1588 | |
| 1589 | for (i = 0; i < N; i++) { |
| 1590 | Proto->Distrib[i] = normal; |
| 1591 | } |
| 1592 | Proto->Style = mixed; |
| 1593 | return (Proto); |
| 1594 | } // NewMixedProto |
| 1595 | |
| 1596 | /** |
| 1597 | * This routine allocates memory to hold a simple prototype |
no test coverage detected