VLFeat - Documentation > C API

# VLFeat.org

Documentation> C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
ikmeans_init.tc File Reference

Integer K-Means - Initialization - Definition. More...

`#include "random.h"`

## Functions

static void | alloc (VlIKMFilt *f, vl_size M, vl_size K)
| Helper function to allocate memory for an IKM quantizer. More...
static void | vl_ikm_init_helper (VlIKMFilt *f)
| Helper function to initialize the quantizer. More...
void | vl_ikm_init (VlIKMFilt *f, vl_ikmacc_t const *centers, vl_size M, vl_size K)
| Initialize quantizer with centers. More...
void | vl_ikm_init_rand (VlIKMFilt *f, vl_size M, vl_size K)
| Initialize quantizer with random centers. More...
void | vl_ikm_init_rand_data (VlIKMFilt *f, vl_uint8 const *data, vl_size M, vl_size N, vl_size K)
| Initialize with centers from random data. More...

## Detailed Description

Author
  Andrea Vedaldi

## Function Documentation

static void alloc | ( | VlIKMFilt * | f,
|  | vl_size | M,
|  | vl_size | K
| ) |  |

static

Parameters

  f | quantizer.
  M | data dimensionality.
  K | number of clusters.

void vl_ikm_init | ( | VlIKMFilt * | f,
|  | vl_ikmacc_t const * | centers,
|  | vl_size | M,
|  | vl_size | K
| ) |  |

Parameters

  f | IKM quantizer.
  centers | centers.
  M | data dimensionality.
  K | number of clusters.

static void vl_ikm_init_helper | ( | VlIKMFilt * | f | ) |

static

Parameters

  f | IKM quantizer.

void vl_ikm_init_rand | ( | VlIKMFilt * | f,
|  | vl_size | M,
|  | vl_size | K
| ) |  |

Parameters

  f | IKM quantizer.
  M | data dimensionality.
  K | number of clusters.

void vl_ikm_init_rand_data | ( | VlIKMFilt * | f,
|  | vl_uint8 const * | data,
|  | vl_size | M,
|  | vl_size | N,
|  | vl_size | K
| ) |  |

Parameters

  f | IKM quantizer.
  data | data.
  M | data dimensionality.
  N | number of data.
  K | number of clusters.