1 /* PSPP - computes sample statistics.
2 Copyright (C) 2004, 2007 Free Software Foundation, Inc.
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.
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.
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
29 /* Opaque structure that represents a case. Use accessor
30 functions instead of accessing any members directly. Use
31 case_move() or case_clone() instead of copying. */
34 struct case_data *case_data; /* Actual data. */
37 void case_nullify (struct ccase *);
38 bool case_is_null (const struct ccase *);
40 void case_create (struct ccase *, size_t value_cnt);
41 void case_clone (struct ccase *, const struct ccase *);
42 void case_move (struct ccase *, struct ccase *);
43 void case_destroy (struct ccase *);
45 size_t case_get_value_cnt (const struct ccase *);
47 void case_resize (struct ccase *, size_t new_value_cnt);
48 void case_swap (struct ccase *, struct ccase *);
50 bool case_try_create (struct ccase *, size_t value_cnt);
51 bool case_try_clone (struct ccase *, const struct ccase *);
53 void case_copy (struct ccase *dst, size_t dst_idx,
54 const struct ccase *src, size_t src_idx,
57 void case_to_values (const struct ccase *, union value *, size_t);
58 void case_from_values (struct ccase *,
59 const union value *, size_t);
61 const union value *case_data (const struct ccase *, const struct variable *);
62 double case_num (const struct ccase *, const struct variable *);
63 const char *case_str (const struct ccase *, const struct variable *);
64 union value *case_data_rw (struct ccase *, const struct variable *);
66 const union value *case_data_idx (const struct ccase *, size_t idx);
67 double case_num_idx (const struct ccase *, size_t idx);
68 const char *case_str_idx (const struct ccase *, size_t idx);
69 union value *case_data_rw_idx (struct ccase *, size_t idx);
71 int case_compare (const struct ccase *, const struct ccase *,
72 const struct variable *const *, size_t var_cnt);
73 int case_compare_2dict (const struct ccase *, const struct ccase *,
74 const struct variable *const *,
75 const struct variable *const *,
78 const union value *case_data_all (const struct ccase *);
79 union value *case_data_all_rw (struct ccase *);