X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcovariance.h;h=5a7be0d68958e0bc2986f332284a4274ad0a3f1b;hb=cff6963f31759a056a6e01e2bb2b8953a2a51cf8;hp=f12e994d52fd6f89d33cbdcb9e5f46e4689d117c;hpb=3c5fcaa67efcee56981c16b543fb9f679787a486;p=pspp diff --git a/src/math/covariance.h b/src/math/covariance.h index f12e994d52..5a7be0d689 100644 --- a/src/math/covariance.h +++ b/src/math/covariance.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2010 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,35 +18,39 @@ #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_1pass_create (size_t n_vars, const struct variable *const *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, bool centered); 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); + const struct variable *wv, enum mv_class excl, bool centered); 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 *); gsl_matrix * covariance_calculate (struct covariance *); -gsl_matrix * covariance_calculate_unnormalized (struct covariance *); +const gsl_matrix * covariance_calculate_unnormalized (struct covariance *); void covariance_destroy (struct covariance *cov); -const gsl_matrix *covariance_moments (const struct covariance *cov, int m); +gsl_matrix *covariance_moments (const struct covariance *cov, int m); const struct categoricals * covariance_get_categoricals (const struct covariance *cov); +size_t covariance_dim (const struct covariance * cov); + +struct pivot_table *covariance_dump_enc_header (const struct covariance *); +void covariance_dump_enc (const struct covariance *, const struct ccase *, + struct pivot_table *); #endif