Lines Matching refs:candidate
67 struct candidate { struct
69 struct candidate *prev, *next; argument
99 static int search (struct candidate **K, int r, int k, int j) in search()
105 if (((struct candidate*)(K[mid]))->b < j && in search()
106 ((struct candidate*)(K[mid + 1]))->b > j) in search()
109 if (((struct candidate*)(K[mid]))->b < j) low = mid + 1; in search()
110 else if (((struct candidate*)(K[mid]))->b > j) upper = mid - 1; in search()
118 static struct candidate * new_candidate (int i, int j, struct candidate* prev) in new_candidate()
120 struct candidate *c = xzalloc(sizeof(struct candidate)); in new_candidate()
129 static void free_candidates(struct candidate *c) in free_candidates()
131 struct candidate *t = c; in free_candidates()
147 static void do_merge(struct candidate **K, int *k, int i, in do_merge()
151 struct candidate *pr = 0, *c = K[0]; in do_merge()
156 if (s >= 0 && (((struct candidate*)(K[s]))->b < j && in do_merge()
157 ((struct candidate*)(K[s + 1]))->b > j)) { in do_merge()
159 if (((struct candidate*)(K[s + 1]))->b > j) { in do_merge()
261 struct candidate **kcand, *pr; in create_j_vector()
319 kcand = xzalloc(size * sizeof(struct candidate*)); in create_j_vector()
330 kcand = xrealloc(kcand, (size * sizeof(struct candidate*))); in create_j_vector()