print3.c 523 B

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