X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcovariance.h;h=4eb2f3f6483f0cc4a4edbdd865dd9c3b1dfd0c31;hb=81579d9e9f994fb2908f50af41c3eb033d216e58;hp=8b8de88e9fa0b1ebfa277f9d25b41e6bf8e5ed0a;hpb=400eaca1f378c40dced767bdc14a395dff220b8d;p=pspp-builds.git diff --git a/src/math/covariance.h b/src/math/covariance.h index 8b8de88e..4eb2f3f6 100644 --- a/src/math/covariance.h +++ b/src/math/covariance.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,24 +18,34 @@ #ifndef COVARIANCE_H #define COVARIANCE_H -#include - -#include #include +#include +#include "data/missing-values.h" struct covariance; struct variable; struct ccase ; +struct categoricals; -struct covariance * covariance_create (size_t n_vars, const struct variable **vars, - const struct variable *wv, enum mv_class excl); +struct covariance * covariance_1pass_create (size_t n_vars, const struct variable *const *vars, + const struct variable *wv, enum mv_class excl); + +struct covariance * +covariance_2pass_create (size_t n_vars, const struct variable *const *vars, + struct categoricals *cats, + const struct variable *wv, enum mv_class excl); void covariance_accumulate (struct covariance *, const struct ccase *); +void covariance_accumulate_pass1 (struct covariance *, const struct ccase *); +void covariance_accumulate_pass2 (struct covariance *, const struct ccase *); -const gsl_matrix * covariance_calculate (struct covariance *cov); +gsl_matrix * covariance_calculate (struct covariance *); +gsl_matrix * covariance_calculate_unnormalized (struct covariance *); void covariance_destroy (struct covariance *cov); const gsl_matrix *covariance_moments (const struct covariance *cov, int m); +const struct categoricals * covariance_get_categoricals (const struct covariance *cov); + #endif