PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ update_means()

static void update_means ( kmeans_config config)
static

Definition at line 72 of file kmeans.c.

References ovdump::args, kmeans_config::centers, kmeans_config::centroid_method, kmeans_config::clusters, kmeans_config::k, kmeans_config::num_objs, kmeans_config::objs, and update_r().

Referenced by kmeans().

73 {
74  int i;
75 
76  for (i = 0; i < config->k; i++)
77  {
78  /* Update the centroid for this cluster */
79  (config->centroid_method)(config->objs, config->clusters, config->num_objs, i, config->centers[i]);
80  }
81 }
int * clusters
Definition: kmeans.h:120
Pointer * centers
Definition: kmeans.h:107
size_t num_objs
Definition: kmeans.h:100
unsigned int k
Definition: kmeans.h:110
Pointer * objs
Definition: kmeans.h:97
kmeans_centroid_method centroid_method
Definition: kmeans.h:88
Here is the call graph for this function:
Here is the caller graph for this function: