/[pspp]/pspp/src/cat.h
ViewVC logotype

Diff of /pspp/src/cat.h

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

revision 1.2 by jstover, Wed Oct 12 21:09:31 2005 UTC revision 1.3 by jstover, Thu Oct 13 19:25:13 2005 UTC
# Line 47  Line 47 
47  struct recoded_categorical  struct recoded_categorical
48  {  {
49    const struct variable *v;     /* Original variable. */    const struct variable *v;     /* Original variable. */
50    union value **vals;    union value *vals;
51    gsl_matrix *m;                /* Vector-encoded values of the original    gsl_matrix *m;                /* Vector-encoded values of the
52                                     variable. The ith row of the matrix corresponds                                     original variable. The ith row of
53                                     to the ith value of a categorical variable.                                     the matrix corresponds to the ith
54                                       value of a categorical variable.
55                                   */                                   */
56    size_t n_categories;    size_t n_categories;
57    size_t first_column;          /* First column of the gsl_matrix which    size_t first_column;          /* First column of the gsl_matrix which
# Line 58  struct recoded_categorical Line 59  struct recoded_categorical
59                                     variable.                                     variable.
60                                   */                                   */
61    size_t last_column;           /* Last column containing the recoded    size_t last_column;           /* Last column containing the recoded
62                                     categories.  The practice of keeping only the                                     categories.  The practice of
63                                     first and last columns of the matrix implies                                     keeping only the first and last
64                                     those columns corresponding to v must be                                     columns of the matrix implies those
65                                       columns corresponding to v must be
66                                     contiguous.                                     contiguous.
67                                   */                                   */
68    size_t n_allocated_categories;        /* This is used only during initialization    size_t n_allocated_categories; /* This is used only during
69                                             to keep track of the number of values                                      initialization to keep
70                                             stored.                                      track of the number of
71                                           */                                      values stored.
72                                     */
73  };  };
74    
75  /*  /*
# Line 96  struct design_matrix_var Line 99  struct design_matrix_var
99                                     in the variable's struct recoded_categorical.                                     in the variable's struct recoded_categorical.
100                                   */                                   */
101    int last_column;    int last_column;
102    struct variable *v;    const struct variable *v;
103  };  };
104  struct design_matrix  struct design_matrix
105  {  {
# Line 115  struct design_matrix Line 118  struct design_matrix
118                                           */                                           */
119    size_t n_vars;    size_t n_vars;
120  };  };
121  const union value *cr_vector_to_value (const gsl_vector *,  union value *cr_vector_to_value (const gsl_vector *,
122                                         struct recoded_categorical *);                                   struct recoded_categorical *);
123    
124  void cr_value_update (struct recoded_categorical *, const union value *);  void cr_value_update (struct recoded_categorical *, const union value *);
125    
# Line 155  void design_matrix_set_numeric (struct d Line 158  void design_matrix_set_numeric (struct d
158  size_t design_matrix_var_to_column (const struct design_matrix *,  size_t design_matrix_var_to_column (const struct design_matrix *,
159                                      const struct variable *);                                      const struct variable *);
160    
161  const struct variable *design_matrix_col_to_var (const struct design_matrix *,  struct variable *design_matrix_col_to_var (const struct design_matrix *,
162                                                   size_t);                                             size_t);
163    
164  void  void
165  design_matrix_set (struct design_matrix *, size_t,  design_matrix_set (struct design_matrix *, size_t,

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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