PostGIS  2.4.9dev-r@@SVN_REVISION@@
kmeans.h File Reference
#include <stdlib.h>
#include "liblwgeom_internal.h"
Include dependency graph for kmeans.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  kmeans_config
 

Macros

#define KMEANS_NULL_CLUSTER   -1
 
#define KMEANS_MAX_ITERATIONS   1000
 
#define kmeans_malloc(size)   lwalloc(size)
 
#define kmeans_free(ptr)   lwfree(ptr)
 

Typedefs

typedef void * Pointer
 
typedef double(* kmeans_distance_method) (const Pointer a, const Pointer b)
 
typedef void(* kmeans_centroid_method) (const Pointer *objs, const int *clusters, size_t num_objs, int cluster, Pointer centroid)
 
typedef struct kmeans_config kmeans_config
 

Enumerations

enum  kmeans_result { KMEANS_OK, KMEANS_EXCEEDED_MAX_ITERATIONS, KMEANS_ERROR }
 

Functions

kmeans_result kmeans (kmeans_config *config)