X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcoefficient.h;h=dda2ae30cf292cb5008f0bf7e14a8440daeaf76e;hb=73f67789df91a09ee91976434fb15c2ee1fb5e78;hp=5fb34c261543c3db14a16ac9e1726407e4094115;hpb=51010fcf5cc308367c1fe3fafa785a3d2216b03d;p=pspp-builds.git diff --git a/src/math/coefficient.h b/src/math/coefficient.h index 5fb34c26..dda2ae30 100644 --- a/src/math/coefficient.h +++ b/src/math/coefficient.h @@ -95,6 +95,15 @@ double pspp_coeff_get_std_err (const struct pspp_coeff *); */ int pspp_coeff_get_n_vars (struct pspp_coeff *); +/* + Which coefficient does this variable match? If the variable is + categorical, and has more than one coefficient, report the first + coefficient found. Note that in this case, the result will depend on + the order of COEFS. + */ +const struct pspp_coeff * +pspp_coeff_var_to_coeff (const struct variable *, struct pspp_coeff **, size_t, const union value *); + /* Which variable does this coefficient match? The int argument is usually 0, unless the coefficient refers to an interaction. @@ -106,4 +115,16 @@ const struct variable *pspp_coeff_get_var (struct pspp_coeff *, */ const union value *pspp_coeff_get_value (struct pspp_coeff *, const struct variable *); + +/* + Get or set the standard deviation of the variable associated with this coefficient. + */ +double pspp_coeff_get_sd (const struct pspp_coeff *); +void pspp_coeff_set_sd (struct pspp_coeff *, double); + +/* + Get or set the mean for the variable associated with this coefficient. +*/ +double pspp_coeff_get_mean (const struct pspp_coeff *); +void pspp_coeff_set_mean (struct pspp_coeff *, double); #endif