c_clear.c 778 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*!
  2. \file cluster/c_clear.c
  3. \brief Cluster library - Clear structures
  4. (C) 2001-2009 by the GRASS Development Team
  5. This program is free software under the GNU General Public License
  6. (>=v2). Read the file COPYING that comes with GRASS for details.
  7. \author Original author CERL
  8. */
  9. #include <grass/cluster.h>
  10. /*!
  11. \brief Clear Cluster structure
  12. \param C pointer to Cluster structure
  13. \return 0
  14. */
  15. int I_cluster_clear(struct Cluster *C)
  16. {
  17. C->points = NULL;
  18. C->band_sum = NULL;
  19. C->band_sum2 = NULL;
  20. C->class = NULL;
  21. C->reclass = NULL;
  22. C->count = NULL;
  23. C->countdiff = NULL;
  24. C->sum = NULL;
  25. C->sumdiff = NULL;
  26. C->sum2 = NULL;
  27. C->mean = NULL;
  28. C->nbands = 0;
  29. I_init_signatures(&C->S, 0);
  30. return 0;
  31. }