/[pspp]/pspp/src/factor_stats.c
ViewVC logotype

Diff of /pspp/src/factor_stats.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by blp, Sun Aug 7 04:39:28 2005 UTC revision 1.16 by blp, Wed Oct 26 05:06:14 2005 UTC
# Line 93  metrics_calc(struct metrics *fs, const u Line 93  metrics_calc(struct metrics *fs, const u
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    
# Line 107  metrics_calc(struct metrics *fs, const u Line 107  metrics_calc(struct metrics *fs, const u
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;
# Line 215  struct weighted_value * Line 215  struct weighted_value *
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;
# Line 256  create_factor_statistics (int n, union v Line 256  create_factor_statistics (int n, union v
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    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26