X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fmoments.h;h=553fba62ba4d66bb4b82499cf1c56aa08db8f9a9;hb=bf868380ccff985a9eeb4e40f307118548411e7c;hp=23457ce67f3771c0654099b3adea9dfe16f3a586;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp diff --git a/src/math/moments.h b/src/math/moments.h index 23457ce67f..553fba62ba 100644 --- a/src/math/moments.h +++ b/src/math/moments.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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,7 +18,7 @@ #define HEADER_MOMENTS #include -#include +#include "data/value.h" /* Moments of the mean. Higher-order moments have higher values. */ @@ -45,11 +45,11 @@ void moments_calculate (const struct moments *, void moments_destroy (struct moments *); /* Convenience functions for two-pass moments. */ -void moments_of_doubles (const double *array, size_t cnt, +void moments_of_doubles (const double *array, size_t n, double *weight, double *mean, double *variance, double *skewness, double *kurtosis); -void moments_of_values (const union value *array, size_t cnt, +void moments_of_values (const union value *array, size_t n, double *weight, double *mean, double *variance, double *skewness, double *kurtosis); @@ -65,7 +65,7 @@ void moments1_calculate (const struct moments1 *, void moments1_destroy (struct moments1 *); /* Standard errors. */ -double calc_semean (double stddev, double weight); +double calc_semean (double variance, double weight); double calc_seskew (double weight); double calc_sekurt (double weight);