RANK: Create all variables together, in order.
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 31 Jan 2013 06:51:02 +0000 (22:51 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 1 Feb 2013 05:27:31 +0000 (21:27 -0800)
commit2beb35516f8749170f786022441a676347f1074d
tree0d0473d74a462e360caa95061deab791f71e105a
parentd74d36ea1af6a6683fcc57997341c2b7421ee454
RANK: Create all variables together, in order.

An upcoming commit will rewrite the RANK implementation so that the
new variables are not created until after a pass through the data.
(This makes sense because their values cannot actually be determined
until that pass is complete, so there is no point in allocating space
for them in cases.)  To do that, it is necessary to figure out the
variable names (and that they will be valid variable names) in
advance.  This commit switches to that approach in advance.

This approach has another small advantage: the order of the variables
added by RANK to the dictionary does not depend on whether the
variables are named by the user or by generating a name.  (This
is why the rank.at test case changes.)
src/language/stats/rank.c
tests/language/stats/rank.at