93 |
assert( (*wv)->v.f == val->f ); |
assert( (*wv)->v.f == val->f ); |
94 |
(*wv)->w += weight; |
(*wv)->w += weight; |
95 |
|
|
96 |
cn = xmalloc( sizeof (struct case_node) ) ; |
cn = xmalloc ( sizeof *cn); |
97 |
cn->next = (*wv)->case_nos ; |
cn->next = (*wv)->case_nos ; |
98 |
cn->num = case_no; |
cn->num = case_no; |
99 |
|
|
107 |
(*wv)->v = *val; |
(*wv)->v = *val; |
108 |
(*wv)->w = weight; |
(*wv)->w = weight; |
109 |
|
|
110 |
cn = xmalloc( sizeof (struct case_node) ) ; |
cn = xmalloc (sizeof *cn); |
111 |
cn->next=0; |
cn->next=0; |
112 |
cn->num = case_no; |
cn->num = case_no; |
113 |
(*wv)->case_nos = cn; |
(*wv)->case_nos = cn; |
215 |
weighted_value_create(void) |
weighted_value_create(void) |
216 |
{ |
{ |
217 |
struct weighted_value *wv; |
struct weighted_value *wv; |
218 |
wv = xmalloc (sizeof (struct weighted_value )); |
wv = xmalloc (sizeof *wv); |
219 |
|
|
220 |
wv->cc = 0; |
wv->cc = 0; |
221 |
wv->case_nos = 0; |
wv->case_nos = 0; |
256 |
{ |
{ |
257 |
struct factor_statistics *f; |
struct factor_statistics *f; |
258 |
|
|
259 |
f = xmalloc( sizeof ( struct factor_statistics )); |
f = xmalloc (sizeof *f); |
260 |
|
|
261 |
f->id[0] = *id0; |
f->id[0] = *id0; |
262 |
f->id[1] = *id1; |
f->id[1] = *id1; |
263 |
f->m = xmalloc( sizeof ( struct metrics ) * n ) ; |
f->m = xnmalloc (n, sizeof *f->m); |
264 |
memset (f->m, 0, sizeof(struct metrics) * n); |
memset (f->m, 0, sizeof(struct metrics) * n); |
265 |
f->n_var = n; |
f->n_var = n; |
266 |
|
|