X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fmatrix-reader.h;h=5aec05e009f4a0f19bdb776b40aeef3b0168c764;hb=aa93c33832ee3dd896062da88b88e7282437ea78;hp=f3ac7000d57cef196f5db9976142caf4483312c8;hpb=a91180ce13a1d95abed44b0c3cc12c94981bb5d6;p=pspp diff --git a/src/language/data-io/matrix-reader.h b/src/language/data-io/matrix-reader.h index f3ac7000d5..5aec05e009 100644 --- a/src/language/data-io/matrix-reader.h +++ b/src/language/data-io/matrix-reader.h @@ -20,6 +20,28 @@ #include #include +struct casereader; +struct ccase; +struct dictionary; +struct matrix_reader; +struct variable; + +struct matrix_reader + { + const struct dictionary *dict; + struct casegrouper *grouper; + + /* Variables in 'dict'. */ + const struct variable **svars; /* Split variables. */ + size_t n_svars; + const struct variable *rowtype; /* ROWTYPE_. */ + const struct variable **fvars; /* Factor variables. */ + size_t n_fvars; + const struct variable *varname; /* VARNAME_. */ + const struct variable **cvars; /* Continuous variables. */ + size_t n_cvars; + }; + struct matrix_material { gsl_matrix *corr; /* The correlation matrix */ @@ -34,22 +56,18 @@ struct matrix_material #define MATRIX_MATERIAL_INIT { .corr = NULL } void matrix_material_uninit (struct matrix_material *); -struct dictionary; -struct variable; -struct casereader; - - -struct matrix_reader; +struct matrix_reader *matrix_reader_create (const struct dictionary *, + struct casereader *); -struct matrix_reader *create_matrix_reader_from_case_reader (const struct dictionary *dict, - struct casereader *in_reader, - const struct variable ***vars, size_t *n_vars); +bool matrix_reader_destroy (struct matrix_reader *mr); -bool destroy_matrix_reader (struct matrix_reader *mr); +bool matrix_reader_next (struct matrix_material *mm, struct matrix_reader *mr, + struct casereader **groupp); -bool next_matrix_from_reader (struct matrix_material *mm, - struct matrix_reader *mr, - const struct variable **vars, int n_vars); +struct substring matrix_reader_get_string (const struct ccase *, + const struct variable *); +void matrix_reader_set_string (struct ccase *, const struct variable *, + struct substring); #endif