From: John Darrington Date: Wed, 10 May 2017 08:50:12 +0000 (+0200) Subject: MATRIX DATA: Allow non-symetric matrices if /FORMAT = FULL. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=176149693e28d1f1e0279f931b1d25e95742b688;p=pspp MATRIX DATA: Allow non-symetric matrices if /FORMAT = FULL. --- diff --git a/src/language/data-io/matrix-data.c b/src/language/data-io/matrix-data.c index 02673f37d2..4370908aca 100644 --- a/src/language/data-io/matrix-data.c +++ b/src/language/data-io/matrix-data.c @@ -182,9 +182,12 @@ preprocess (struct casereader *casereader0, const struct dictionary *dict, void if (e == SYSMIS) continue; - + /* Fill in the lower triangle */ (matrices[n_splits-1])[col + mformat->n_continuous_vars * row] = e; - (matrices[n_splits-1]) [row + mformat->n_continuous_vars * col] = e; + + if (mformat->triangle != FULL) + /* Fill in the upper triangle */ + (matrices[n_splits-1]) [row + mformat->n_continuous_vars * col] = e; } row++; } @@ -269,7 +272,6 @@ preprocess (struct casereader *casereader0, const struct dictionary *dict, void if (prev_case) case_copy (outcase, 0, prev_case, 0, caseproto_get_n_widths (proto)); - const struct variable *var = dict_get_var (dict, idx + 1 + row); set_varname_column (outcase, mformat->varname, var_get_name (var));