1 /* PSPP - A program for statistical analysis . -*-c-*-
3 Copyright (C) 2004 Free Software Foundation, Inc.
4 Author: John Darrington 2004
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 /* FIXME: These things should probably be amalgamated with the
26 group_statistics struct */
52 struct factor_statistics {
54 /* The value of the independent variable for this factor */
55 const union value *id;
57 /* An array of metrics indexed by dependent variable */
58 struct metrics *stats;
64 void metrics_precalc(struct metrics *fs);
66 void metrics_calc(struct metrics *fs, double x, double weight);
68 void metrics_postcalc(struct metrics *fs);
73 /* These functions are necessary for creating hashes */
75 int compare_indep_values(const struct factor_statistics *f1,
76 const struct factor_statistics *f2,
79 unsigned hash_indep_value(const struct factor_statistics *f, int width) ;
81 void free_factor_stats(struct factor_statistics *f, int width );