PostGIS  2.3.7dev-r@@SVN_REVISION@@
lwkmeans.c File Reference
#include <float.h>
#include <math.h>
#include "kmeans.h"
#include "liblwgeom_internal.h"
Include dependency graph for lwkmeans.c:

Go to the source code of this file.

Functions

static double lwkmeans_pt_distance (const Pointer a, const Pointer b)
 
static int lwkmeans_pt_closest (const Pointer *objs, size_t num_objs, const Pointer a)
 
static void lwkmeans_pt_centroid (const Pointer *objs, const int *clusters, size_t num_objs, int cluster, Pointer centroid)
 
int * lwgeom_cluster_2d_kmeans (const LWGEOM **geoms, int ngeoms, int k)
 Take a list of LWGEOMs and a number of clusters and return an integer array indicating which cluster each geometry is in. More...