I'm trying to use a library function from VLFeat that calls for data to be a const void *. I don't really understand how to create the data and then pass it in.
void vl_kmeans_init_centers_with_rand_data (VlKMeans * self, void const * data,
vl_size dimension, vl_size numData, vl_size numCenters)
The data argument is the one that throws me. I tried building a random data matrix to test the kmeans clustering function, but I can't figure out how to use the data. In other words, this function requires this argument. But for it to be useful, I have to understand what how to cast/create/load the data to make it work. That means, I need to understand the purpose of the const void *
type in the argument.
Any help would be highly appreciated.
Note: I do understand what const means, but, for example, I can't figure out how I can iteratively build const data (i.e. fill a matrix with dual for loops)
Thanks!