ikmeans.c File Reference
Detailed Description
Definition in file ikmeans.c.
#include "ikmeans.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "assert.h"
#include "ikmeans_init.tc"
#include "ikmeans_lloyd.tc"
#include "ikmeans_elkan.tc"
Go to the source code of this file.
Functions | |
VlIKMFilt * | vl_ikm_new (int method) |
Create a new IKM quantizer. | |
void | vl_ikm_delete (VlIKMFilt *f) |
Delete IKM quantizer. | |
VL_EXPORT int | vl_ikm_train (VlIKMFilt *f, vl_uint8 const *data, int N) |
Train clusters. | |
VL_EXPORT void | vl_ikm_push (VlIKMFilt *f, vl_uint *asgn, vl_uint8 const *data, int N) |
Project data to clusters. | |
VL_EXPORT vl_uint | vl_ikm_push_one (vl_ikm_acc const *centers, vl_uint8 const *data, int M, int K) |
Project one datum to clusters. |
Function Documentation
void vl_ikm_delete | ( | VlIKMFilt * | f | ) |
VlIKMFilt* vl_ikm_new | ( | int | method | ) |
- Parameters:
-
method Clustering algorithm.
method has values in the enumerations VlIKMAlgorithms.
- Returns:
- new IKM quantizer.
Definition at line 105 of file ikmeans.c.
References vl_malloc().
Referenced by xmeans().
- Parameters:
-
f IKM quantizer. asgn Assignments (out). data data. N number of data (N >=
1).
Definition at line 176 of file ikmeans.c.
References VL_IKM_ELKAN, and VL_IKM_LLOYD.
Referenced by vl_hikm_push(), and xmeans().
VL_EXPORT vl_uint vl_ikm_push_one | ( | vl_ikm_acc const * | centers, | |
vl_uint8 const * | data, | |||
int | M, | |||
int | K | |||
) |
- Parameters:
-
centers centers. data datum to project. K number of centers. M dimensionality of the datum.
- Returns:
- the cluster index.
Definition at line 200 of file ikmeans.c.
Referenced by vl_ikm_push_lloyd().
- Parameters:
-
f IKM quantizer. data data. N number of data (N >=
1).
- Returns:
- -1 if an overflow may have occurred.
Definition at line 144 of file ikmeans.c.
References VL_IKM_ELKAN, VL_IKM_LLOYD, and VL_PRINTF.
Referenced by xmeans().