ikmeans.h
Go to the documentation of this file.
00001 
00007 /*
00008 Copyright (C) 2014 Andrea Vedaldi.
00009 Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
00010 All rights reserved.
00011 
00012 This file is part of the VLFeat library and is made available under
00013 the terms of the BSD license (see the COPYING file).
00014 */
00015 
00016 #ifndef VL_IKMEANS_H
00017 #define VL_IKMEANS_H
00018 
00019 #include "generic.h"
00020 #include "random.h"
00021 
00022 #if 0
00023 typedef vl_int64 vl_ikmacc_t ; 
00024 #define VL_IKMACC_MAX 0x7fffffffffffffffULL
00025 #else
00026 typedef vl_int32 vl_ikmacc_t ; 
00027 #define VL_IKMACC_MAX 0x7fffffffUL
00028 #endif
00029 
00030 
00035 enum VlIKMAlgorithms {
00036   VL_IKM_LLOYD, 
00037   VL_IKM_ELKAN, 
00038 } ;
00039 
00044 typedef struct _VlIKMFilt
00045 {
00046   vl_size M ; 
00047   vl_size K ; 
00048   vl_size max_niters ; 
00049   int method ; 
00050   int verb ; 
00051   vl_ikmacc_t *centers ; 
00052   vl_ikmacc_t *inter_dist ; 
00053 } VlIKMFilt ;
00054 
00057 VL_EXPORT VlIKMFilt *vl_ikm_new (int method) ;
00058 VL_EXPORT void vl_ikm_delete (VlIKMFilt *f) ;
00063 VL_EXPORT void vl_ikm_init (VlIKMFilt *f, vl_ikmacc_t const *centers, vl_size M, vl_size K) ;
00064 VL_EXPORT void vl_ikm_init_rand (VlIKMFilt *f, vl_size M, vl_size K) ;
00065 VL_EXPORT void vl_ikm_init_rand_data (VlIKMFilt *f, vl_uint8 const *data, vl_size M, vl_size N, vl_size K) ;
00066 VL_EXPORT int  vl_ikm_train (VlIKMFilt *f, vl_uint8 const *data, vl_size N) ;
00067 VL_EXPORT void vl_ikm_push (VlIKMFilt *f, vl_uint32 *asgn, vl_uint8 const *data, vl_size N) ;
00068 VL_EXPORT vl_uint vl_ikm_push_one (vl_ikmacc_t const *centers, vl_uint8 const *data, vl_size M, vl_size K) ;
00073 VL_EXPORT vl_size vl_ikm_get_ndims (VlIKMFilt const *f) ;
00074 VL_EXPORT vl_size vl_ikm_get_K (VlIKMFilt const *f) ;
00075 VL_EXPORT int vl_ikm_get_verbosity (VlIKMFilt const *f) ;
00076 VL_EXPORT vl_size vl_ikm_get_max_niters (VlIKMFilt const *f) ;
00077 VL_EXPORT vl_ikmacc_t const *vl_ikm_get_centers (VlIKMFilt const *f) ;
00082 VL_EXPORT void vl_ikm_set_verbosity (VlIKMFilt *f, int verb) ;
00083 VL_EXPORT void vl_ikm_set_max_niters (VlIKMFilt *f, vl_size max_niters) ;
00086 /* VL_IKMEANS_H */
00087 #endif


libvlfeat
Author(s): Andrea Vedaldi
autogenerated on Thu Jun 6 2019 20:25:51