GRASS GIS 7 Programmer's Manual  7.0.2(2015)-r00000
c_merge.c
Go to the documentation of this file.
1 
14 #include <grass/cluster.h>
15 
23 int I_cluster_merge(struct Cluster *C)
24 {
25  int band, p;
26  int c1, c2;
27 
28  c1 = C->merge1;
29  c2 = C->merge2;
30 
31  for (p = 0; p < C->npoints; p++)
32  if (C->class[p] == c2)
33  C->class[p] = c1;
34  C->count[c1] += C->count[c2];
35  C->count[c2] = 0;
36  for (band = 0; band < C->nbands; band++) {
37  C->sum[band][c1] += C->sum[band][c2];
38  C->sum[band][c2] = 0;
39  }
40 
41  return 0;
42 }
int I_cluster_merge(struct Cluster *C)
?
Definition: c_merge.c:23