ikmeans.c File Reference
Integer K-Means clustering - Definition. More...
#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"Functions | |
| VlIKMFilt * | vl_ikm_new (int method) |
| Create a new IKM quantizer. | |
| void | vl_ikm_delete (VlIKMFilt *f) |
| Delete IKM quantizer. | |
| int | vl_ikm_train (VlIKMFilt *f, vl_uint8 const *data, int N) |
| Train clusters. | |
| void | vl_ikm_push (VlIKMFilt *f, vl_uint *asgn, vl_uint8 const *data, int N) |
| Project data to clusters. | |
| vl_uint | vl_ikm_push_one (vl_ikm_acc const *centers, vl_uint8 const *data, int M, int K) |
| Project one datum to clusters. | |
Detailed Description
Function Documentation
| void vl_ikm_delete | ( | VlIKMFilt * | f | ) |
- Parameters:
-
f IKM quantizer.
| VlIKMFilt* vl_ikm_new | ( | int | method | ) |
- Parameters:
-
method Clustering algorithm.
The function allocates initializes a new IKM quantizer to operate based algorithm method.
method has values in the enumerations VlIKMAlgorithms.
- Returns:
- new IKM quantizer.
- Parameters:
-
f IKM quantizer. asgn Assignments (out). data data. N number of data (N >=1).
The function projects the data data on the integer K-means clusters specified by the IKM quantizer f. Notice that the quantizer must be initialized.
| 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.
The function projects the specified datum data on the clusters specified by the centers centers.
- Returns:
- the cluster index.