X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcasefilter.h;h=083322ee58935d5f3025c11ec9c182717af2266d;hb=13d1b533c6ce0545a4b06e5e30c73211591034c5;hp=00fac3bb12763be073d4f6edbe9cd4b15f012866;hpb=f43378497b8400e9c22a3485c534693dc1bc9554;p=pspp-builds.git diff --git a/src/data/casefilter.h b/src/data/casefilter.h index 00fac3bb..083322ee 100644 --- a/src/data/casefilter.h +++ b/src/data/casefilter.h @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 2006 Free Software Foundation, Inc. - Written by John Darrington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -21,22 +20,24 @@ #define casefilter_h 1 #include +#include struct ccase; struct casefilter; struct variable ; -/* Create a new casefilter. - If EXCL is true, then the filter user missing values to be missing, - otherwise they are considered at their face value. +/* Create a new casefilter that drops cases in which any of the + N_VARS variables in VARS are missing in the given CLASS. VARS is an array of variables which if *any* of them are missing. N_VARS is the size of VARS. */ -struct casefilter * casefilter_create (bool, struct variable **, int); +struct casefilter * casefilter_create (enum mv_class class, + struct variable **, int); /* Add the variables in VARS to the list of variables for which the filter considers. N_VARS is the size of VARS */ -void casefilter_add_variables (struct casefilter *, struct variable **, int); +void casefilter_add_variables (struct casefilter *, + struct variable *const*, int); /* Destroy the filter FILTER */ void casefilter_destroy (struct casefilter *); @@ -44,7 +45,10 @@ void casefilter_destroy (struct casefilter *); /* Returns true iff the entire case should be skipped */ bool casefilter_skip_case (const struct casefilter *, const struct ccase *); -/* Returns true iff the variable V in case C is missing */ +/* Returns true iff the variable V in case C is missing. + Note that this function's behaviour is independent of the set of + variables contained by the filter. + */ bool casefilter_variable_missing (const struct casefilter *f, const struct ccase *c, const struct variable *v);