X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fdesign-matrix.h;h=b1cda5a9068d38be49ed45dd53a5016f78368056;hb=f2828681881061ed4e2688b3d08f4d9bdf7bc58e;hp=8d56d010c5974f0ebf558dc3d12989f96e96f093;hpb=48346ffb716dcc6846ba9fc06b3bed624df767fa;p=pspp-builds.git diff --git a/src/math/design-matrix.h b/src/math/design-matrix.h index 8d56d010..b1cda5a9 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,16 @@ 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); +size_t dm_get_exact_subscript (const struct design_matrix *, const struct variable *, + const union value *); #endif