X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fquick-cluster.c;h=be04af929fb1dc435a090f481965d359b054ab20;hb=60c545e6e958d868db3399a8989d37d8f9e0c131;hp=e3bb76e42257362387c0077c2f4fb7f3a047ab64;hpb=339f1956cc727eda788638644ef93ab7852b31cd;p=pspp diff --git a/src/language/stats/quick-cluster.c b/src/language/stats/quick-cluster.c index e3bb76e422..be04af929f 100644 --- a/src/language/stats/quick-cluster.c +++ b/src/language/stats/quick-cluster.c @@ -610,7 +610,7 @@ quick_cluster_show_centers (struct Kmeans *kmeans, bool initial, const struct qc /* A transformation function which juxtaposes the dataset with the (pre-prepared) dataset containing membership and/or distance values. */ -static int +static enum trns_result save_trans_func (void *aux, struct ccase **c, casenumber x UNUSED) { const struct save_trans_data *std = aux; @@ -1076,7 +1076,12 @@ cmd_quick_cluster (struct lexer *lexer, struct dataset *ds) std->distance = dict_create_var_assert (qc.dict, qc.var_distance, 0); } - add_transformation (qc.dataset, save_trans_func, save_trans_destroy, std); + static const struct trns_class trns_class = { + .name = "QUICK CLUSTER", + .execute = save_trans_func, + .destroy = save_trans_destroy, + }; + add_transformation (qc.dataset, &trns_class, std); } free (qc.var_distance);