Removed my authorship lines.
[pspp] / src / data / casefilter.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 2006 Free Software Foundation, Inc.
3
4    This program is free software; you can redistribute it and/or
5    modify it under the terms of the GNU General Public License as
6    published by the Free Software Foundation; either version 2 of the
7    License, or (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17    02110-1301, USA. */
18
19 #if !casefilter_h
20 #define casefilter_h 1
21
22 #include <stdbool.h>
23
24 struct ccase;
25 struct casefilter;
26 struct variable ;
27
28 /* Create a new casefilter.
29    If EXCL is true, then the filter  user missing values to be missing, 
30    otherwise they are considered at their face value.
31    VARS is an array of variables which if *any* of them are missing.
32    N_VARS is the size of VARS.
33  */
34 struct casefilter * casefilter_create (bool, struct variable **, int);
35
36 /* Add the variables in VARS to the list of variables for which the
37    filter considers. N_VARS is the size of VARS */
38 void casefilter_add_variables (struct casefilter *, struct variable **, int);
39
40 /* Destroy the filter FILTER */
41 void casefilter_destroy (struct casefilter *); 
42
43 /* Returns true iff the entire case should be skipped */
44 bool casefilter_skip_case (const struct casefilter *, const struct ccase *);
45
46 /* Returns true iff the variable V in case C is missing */
47 bool casefilter_variable_missing (const struct casefilter *f, 
48                                    const struct ccase *c, 
49                                    const struct variable *v);
50
51 #endif