X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcase-ordering.h;h=f49f26511402af246c01e26f5bbc2291e1b449e0;hb=5ee84736663824fe12474b78dace867e42893a14;hp=f1b6c30f7b7352638596a175c011850760328005;hpb=576237eae45fe54ea5ee41d44e257f6aa7e88861;p=pspp-builds.git diff --git a/src/data/case-ordering.h b/src/data/case-ordering.h index f1b6c30f..f49f2651 100644 --- a/src/data/case-ordering.h +++ b/src/data/case-ordering.h @@ -1,20 +1,20 @@ -/* PSPP - computes sample statistics. +/* PSPP - a program for statistical analysis. Copyright (C) 2007 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 the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ + +/* Sort order for comparing cases. */ #ifndef DATA_CASE_ORDERING_H #define DATA_CASE_ORDERING_H 1 @@ -31,21 +31,27 @@ enum sort_direction SRT_DESCEND /* Z, Y, X, ..., C, B, A. */ }; -struct case_ordering *case_ordering_create (const struct dictionary *); +/* Creation and destruction. */ +struct case_ordering *case_ordering_create (void); struct case_ordering *case_ordering_clone (const struct case_ordering *); void case_ordering_destroy (struct case_ordering *); -size_t case_ordering_get_value_cnt (const struct case_ordering *); +/* Modification. */ +bool case_ordering_add_var (struct case_ordering *, + const struct variable *, enum sort_direction); + +/* Comparing cases. */ int case_ordering_compare_cases (const struct ccase *, const struct ccase *, const struct case_ordering *); -bool case_ordering_add_var (struct case_ordering *, - struct variable *, enum sort_direction); +/* Inspection. */ +size_t case_ordering_get_value_cnt (const struct case_ordering *); size_t case_ordering_get_var_cnt (const struct case_ordering *); -struct variable *case_ordering_get_var (const struct case_ordering *, size_t); +const struct variable *case_ordering_get_var (const struct case_ordering *, + size_t); enum sort_direction case_ordering_get_direction (const struct case_ordering *, size_t); void case_ordering_get_vars (const struct case_ordering *, - struct variable ***, size_t *); + const struct variable ***, size_t *); #endif /* data/case-ordering.h */