15#include <grass/cluster.h>
33 G_debug(3,
"I_cluster_assign(npoints=%d,nclasses=%d,nbands=%d)", C->npoints,
34 C->nclasses, C->nbands);
36 for (p = 0; p < C->npoints; p++) {
42 for (c = 0; c < C->nclasses; c++) {
44 for (band = 0; band < C->nbands; band++) {
45 q = C->points[band][p];
46 q -= C->mean[band][c];
49 if (c == 0 || d < dmin) {
56 for (band = 0; band < C->nbands; band++)
57 C->sum[band][
class] += C->points[band][p];
int I_cluster_assign(struct Cluster *C, int *interrupted)
Assign cluster.
int G_debug(int level, const char *msg,...)
Print debugging message.
#define HUGE_VAL
Values needed for Ray-Convex Polyhedron Intersection Test below originally by Eric Haines,...