1 #include <grass/gis.h>
2 #include <grass/glocale.h>
3 #include <grass/imagery.h>
4 #include <grass/cluster.h>
5 
6 
7 /*
8  * safe to call only during checkpoint(1)
9  */
10 
print_seed_means(FILE * fd,struct Cluster * C)11 int print_seed_means(FILE * fd, struct Cluster *C)
12 {
13     int band;
14     int c;
15 
16     fprintf(fd, _("%sinitial means for each band%s%s"),
17 	    HOST_NEWLINE, HOST_NEWLINE, HOST_NEWLINE);
18 
19     for (c = 0; c < C->nclasses; c++) {
20 	fprintf(fd, _("class %-3d "), c + 1);
21 	for (band = 0; band < C->nbands; band++)
22 	    fprintf(fd, " %g", C->mean[band][c]);
23 	fprintf(fd, "%s", HOST_NEWLINE);
24     }
25     fprintf(fd, "%s", HOST_NEWLINE);
26 
27     return 0;
28 }
29