2 * Copyright (c) 2017 Mohamed Aslan <maslan@sce.carleton.ca>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29 struct cluster
*clusters
;
32 #define KMEANS_INCR_MAXTHRESH 1024
36 struct cluster
*clusters
;
39 void kmeans_seq_init(struct kmeans_seq
*, size_t);
40 void kmeans_seq_insert(struct kmeans_seq
*, double, double);
41 double kmeans_seq_find(struct kmeans_seq
*, double);
42 void kmeans_seq_print(struct kmeans_seq
*, const char *);
43 void kmeans_incr_init(struct kmeans_incr
*, double);
44 void kmeans_incr_insert(struct kmeans_incr
*, double, double);
45 double kmeans_incr_find(struct kmeans_incr
*, double);
46 void kmeans_incr_print(struct kmeans_incr
*, const char *);