# HG changeset patch # User jbe # Date 1381702852 -7200 # Node ID 92cdb3af0b5445fe08f691a3cdbffc545f231943 # Parent 1821e7aee87fb8a11bcbb6d86ef202fb3200b8c1 lf_update_issue_order.c: Replaced occurences of "suggestion" with "issue" diff -r 1821e7aee87f -r 92cdb3af0b54 lf_update_issue_order.c --- a/lf_update_issue_order.c Mon Oct 14 00:19:38 2013 +0200 +++ b/lf_update_issue_order.c Mon Oct 14 00:20:52 2013 +0200 @@ -32,9 +32,9 @@ #define COL_WEIGHT 1 #define COL_ISSUE_ID 2 -// data structure for a candidate (in this case a suggestion) to the proportional runoff system: +// data structure for a candidate (in this case an issue) to the proportional runoff system: struct candidate { - char *key; // identifier of the candidate, which is the "suggestion_id" string + char *key; // identifier of the candidate, which is the "issue_id" string double score_per_step; // added score per step double score; // current score of candidate; a score of 1.0 is needed to survive a round int seat; // equals 0 for unseated candidates, or contains rank number @@ -64,11 +64,11 @@ candidate = candidates + (candidate_count++); candidate->key = *candidate_key; candidate->seat = 0; - if (logging) printf("Candidate #%i is suggestion #%s.\n", candidate_count, candidate->key); + if (logging) printf("Candidate #%i is issue #%s.\n", candidate_count, candidate->key); } } -// performs a binary search in candidates[] array to lookup a candidate by its key (which is the suggestion_id): +// performs a binary search in candidates[] array to lookup a candidate by its key (which is the issue_id): static struct candidate *candidate_by_key(char *candidate_key) { struct candidate *candidate; struct candidate compare; @@ -141,7 +141,7 @@ for (i=0; i 0.0) { double max_scale; max_scale = (1.0-candidates[i].score) / candidates[i].score_per_step; @@ -269,7 +269,7 @@ if (logging) printf("Done.\n"); return 0; } - // calculate ballot_count and generate set of candidate keys (suggestion_id is used as key): + // calculate ballot_count and generate set of candidate keys (issue_id is used as key): for (i=0; i