X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fdesign-matrix.h;h=458145801fa0d4686776c923becc270b2a328056;hb=a5f512f378fbab43da8496d366dedcf59f29f580;hp=8d56d010c5974f0ebf558dc3d12989f96e96f093;hpb=48346ffb716dcc6846ba9fc06b3bed624df767fa;p=pspp-builds.git diff --git a/src/math/design-matrix.h b/src/math/design-matrix.h index 8d56d010..45814580 100644 --- a/src/math/design-matrix.h +++ b/src/math/design-matrix.h @@ -58,6 +58,9 @@ struct design_matrix design_matrix_var structure. */ + size_t *n_cases; /* Element i is the number of valid cases for this + variable. + */ size_t n_vars; }; @@ -82,5 +85,13 @@ size_t design_matrix_var_to_column (const struct design_matrix *, const struct variable *design_matrix_col_to_var (const struct design_matrix *, size_t); +void design_matrix_increment_case_count (struct design_matrix *, const struct variable *); +void design_matrix_set_case_count (struct design_matrix *, const struct variable *, size_t); + +size_t design_matrix_get_case_count (const struct design_matrix *, const struct variable *); +size_t design_matrix_get_n_cols (const struct design_matrix *); +size_t design_matrix_get_n_rows (const struct design_matrix *); +double design_matrix_get_element (const struct design_matrix *, size_t, size_t); +void design_matrix_set_element (const struct design_matrix *, size_t, size_t, double); #endif