1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2007 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 A case map copies data from a case that corresponds to one
21 dictionary to a case that corresponds to a second dictionary.
22 A few options are available for ways to create the mapping. */
24 #ifndef DATA_CASE_MAP_H
25 #define DATA_CASE_MAP_H 1
33 struct case_map *case_map_create (void);
34 void case_map_destroy (struct case_map *);
35 void case_map_execute (const struct case_map *,
36 const struct ccase *, struct ccase *);
38 size_t case_map_get_value_cnt (const struct case_map *);
40 /* For mapping cases for one version of a dictionary to those in
41 a modified version of the same dictionary. */
42 void case_map_prepare_dict (const struct dictionary *);
43 struct case_map *case_map_from_dict (const struct dictionary *);
45 /* For eliminating "holes" in a case. */
46 struct case_map *case_map_to_compact_dict (const struct dictionary *d,
47 unsigned int exclude_classes);
49 /* For mapping cases for one dictionary to another based on
50 variable names within the dictionary. */
51 struct case_map *case_map_by_name (const struct dictionary *old,
52 const struct dictionary *new);
54 void case_map_dump (const struct case_map *);
56 #endif /* data/case-map.h */