projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
662076a
)
improve naming
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 15 Jan 2022 05:06:17 +0000
(21:06 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 13 Mar 2022 23:56:02 +0000
(16:56 -0700)
src/language/stats/ctables.c
patch
|
blob
|
history
diff --git
a/src/language/stats/ctables.c
b/src/language/stats/ctables.c
index 2e0b51334f2aac778662163650a56a342e991236..510efcd5cd224df0ed4eb4f9a279f68fcf0fe88f 100644
(file)
--- a/
src/language/stats/ctables.c
+++ b/
src/language/stats/ctables.c
@@
-279,7
+279,7
@@
enum ctables_label_position
struct ctables_summary_spec_set
{
struct ctables_summary_spec_set
{
- struct ctables_summary_spec *s
ummarie
s;
+ struct ctables_summary_spec *s
pec
s;
size_t n;
size_t allocated;
size_t n;
size_t allocated;
@@
-546,8
+546,8
@@
static void
ctables_summary_spec_set_uninit (struct ctables_summary_spec_set *set)
{
for (size_t i = 0; i < set->n; i++)
ctables_summary_spec_set_uninit (struct ctables_summary_spec_set *set)
{
for (size_t i = 0; i < set->n; i++)
- ctables_summary_spec_uninit (&set->s
ummarie
s[i]);
- free (set->s
ummarie
s);
+ ctables_summary_spec_uninit (&set->s
pec
s[i]);
+ free (set->s
pec
s);
}
static bool
}
static bool
@@
-773,10
+773,10
@@
add_summary_spec (struct ctables_axis *axis,
struct ctables_summary_spec_set *set = (totals ? &axis->total_sss
: &axis->cell_sss);
if (set->n >= set->allocated)
struct ctables_summary_spec_set *set = (totals ? &axis->total_sss
: &axis->cell_sss);
if (set->n >= set->allocated)
- set->s
ummaries = x2nrealloc (set->summarie
s, &set->allocated,
-
sizeof *set->summarie
s);
+ set->s
pecs = x2nrealloc (set->spec
s, &set->allocated,
+
sizeof *set->spec
s);
- struct ctables_summary_spec *dst = &set->s
ummarie
s[set->n++];
+ struct ctables_summary_spec *dst = &set->s
pec
s[set->n++];
*dst = (struct ctables_summary_spec) {
.function = function,
.percentile = percentile,
*dst = (struct ctables_summary_spec) {
.function = function,
.percentile = percentile,
@@
-2288,7
+2288,7
@@
ctables_cell_insert__ (struct ctables_table *t, const struct ccase *c,
= (cell->total ? &ss->total_sss : &ss->cell_sss);
cell->summaries = xmalloc (sss->n * sizeof *cell->summaries);
for (size_t i = 0; i < sss->n; i++)
= (cell->total ? &ss->total_sss : &ss->cell_sss);
cell->summaries = xmalloc (sss->n * sizeof *cell->summaries);
for (size_t i = 0; i < sss->n; i++)
- ctables_summary_init (&cell->summaries[i], &sss->s
ummarie
s[i]);
+ ctables_summary_init (&cell->summaries[i], &sss->s
pec
s[i]);
}
for (enum ctables_domain_type dt = 0; dt < N_CTDTS; dt++)
cell->domains[dt] = ctables_domain_insert (t, cell, dt);
}
for (enum ctables_domain_type dt = 0; dt < N_CTDTS; dt++)
cell->domains[dt] = ctables_domain_insert (t, cell, dt);
@@
-2308,7
+2308,7
@@
ctables_cell_add__ (struct ctables_table *t, const struct ccase *c,
const struct ctables_summary_spec_set *sss
= (cell->total ? &ss->total_sss : &ss->cell_sss);
for (size_t i = 0; i < sss->n; i++)
const struct ctables_summary_spec_set *sss
= (cell->total ? &ss->total_sss : &ss->cell_sss);
for (size_t i = 0; i < sss->n; i++)
- ctables_summary_add (&cell->summaries[i], &sss->s
ummarie
s[i], sss->var,
+ ctables_summary_add (&cell->summaries[i], &sss->s
pec
s[i], sss->var,
case_data (c, sss->var), weight);
for (enum ctables_domain_type dt = 0; dt < N_CTDTS; dt++)
cell->domains[dt]->valid += weight;
case_data (c, sss->var), weight);
for (enum ctables_domain_type dt = 0; dt < N_CTDTS; dt++)
cell->domains[dt]->valid += weight;
@@
-2480,14
+2480,14
@@
ctables_execute (struct dataset *ds, struct ctables *ct)
if (!nest->cell_sss.n)
{
struct ctables_summary_spec_set *sss = &nest->cell_sss;
if (!nest->cell_sss.n)
{
struct ctables_summary_spec_set *sss = &nest->cell_sss;
- sss->s
ummaries = xmalloc (sizeof *sss->summarie
s);
+ sss->s
pecs = xmalloc (sizeof *sss->spec
s);
sss->n = 1;
enum ctables_summary_function function
= sss->var ? CTSF_MEAN : CTSF_COUNT;
struct ctables_var var = { .is_mrset = false, .var = sss->var };
sss->n = 1;
enum ctables_summary_function function
= sss->var ? CTSF_MEAN : CTSF_COUNT;
struct ctables_var var = { .is_mrset = false, .var = sss->var };
- *sss->s
ummarie
s = (struct ctables_summary_spec) {
+ *sss->s
pec
s = (struct ctables_summary_spec) {
.function = function,
.format = ctables_summary_default_format (function, &var),
.label = ctables_summary_default_label (function, 0),
.function = function,
.format = ctables_summary_default_format (function, &var),
.label = ctables_summary_default_label (function, 0),
@@
-2644,7
+2644,7
@@
ctables_execute (struct dataset *ds, struct ctables *ct)
for (size_t m = 0; m < sss->n; m++)
{
int leaf = pivot_category_create_leaf (
for (size_t m = 0; m < sss->n; m++)
{
int leaf = pivot_category_create_leaf (
- parent, pivot_value_new_text (sss->s
ummarie
s[m].label));
+ parent, pivot_value_new_text (sss->s
pec
s[m].label));
if (m == 0)
prev_leaf = leaf;
}
if (m == 0)
prev_leaf = leaf;
}
@@
-2697,9
+2697,9
@@
ctables_execute (struct dataset *ds, struct ctables *ct)
dindexes[n_dindexes++] = leaf;
}
dindexes[n_dindexes++] = leaf;
}
- double d = ctables_summary_value (cell, &cell->summaries[j], &sss->s
ummarie
s[j]);
+ double d = ctables_summary_value (cell, &cell->summaries[j], &sss->s
pec
s[j]);
struct pivot_value *value = pivot_value_new_number (d);
struct pivot_value *value = pivot_value_new_number (d);
- value->numeric.format = sss->s
ummarie
s[j].format;
+ value->numeric.format = sss->s
pec
s[j].format;
pivot_table_put (pt, dindexes, n_dindexes, value);
}
}
pivot_table_put (pt, dindexes, n_dindexes, value);
}
}