Replace case_ordering with subcase.
authorBen Pfaff <blp@gnu.org>
Sun, 30 Nov 2008 23:23:20 +0000 (15:23 -0800)
committerBen Pfaff <blp@gnu.org>
Wed, 3 Dec 2008 04:26:47 +0000 (20:26 -0800)
commited09f0f21add5e56e8395a5e8589cda6f96420bf
tree3f462e1ed104ce291cbe5b38df0dde1b4bc71312
parent354747add9edd5203365db70f7ffa282621a0a08
Replace case_ordering with subcase.

The case_ordering data structure was useful for comparing cases,
but that is all that it did.  In fact, the same data structure
can be used, at least, for extracting data from cases into arrays
of values, stuffing values back into cases, and for more general
comparisons than case_ordering anticipated.

This commit adds those abilities to case_ordering.  It also renames
it to "subcase", because it is useful for more than just sorting
cases, which is all that case_ordering was designed for.

This commit also changes the allocation pattern for subcase from
having the implementation allocate all of the memory, to having
the subcase client allocate "struct subcase".  This saves a
memory allocation without making life harder for anyone.

  - Naming: the "case_ordering" name implied that it was
    only useful for ordering (comparing cases).

  - Interface: the interface
20 files changed:
src/data/automake.mk
src/data/case-ordering.c [deleted file]
src/data/case-ordering.h [deleted file]
src/data/casegrouper.c
src/data/casegrouper.h
src/data/subcase.c [new file with mode: 0644]
src/data/subcase.h [new file with mode: 0644]
src/language/stats/aggregate.c
src/language/stats/examine.q
src/language/stats/rank.q
src/language/stats/sort-cases.c
src/language/stats/sort-criteria.c
src/language/stats/sort-criteria.h
src/language/stats/wilcoxon.c
src/math/merge.c
src/math/merge.h
src/math/sort.c
src/math/sort.h
src/ui/gui/psppire-case-file.c
src/ui/gui/psppire-case-file.h