table sections exist
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 2 Jan 2022 21:37:44 +0000 (13:37 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 13 Mar 2022 23:56:02 +0000 (16:56 -0700)
src/language/stats/ctables.c

index 88c326c8d0c4576f216159b5f0671a43054f80c9..3954637f33b70327f7c751c59b1c1b4515d0949f 100644 (file)
@@ -146,13 +146,18 @@ enum {
 
 enum ctables_domain_type
   {
-    CTDT_TABLE,                  /* Entire table. */
-    CTDT_SUBTABLE,               /* Innermost variable in a single layer. */
+    /* Within a section, where stacked variables divide one section from
+       another. */
+    CTDT_TABLE,                  /* All layers of a whole section. */
+    CTDT_LAYER,                  /* One layer within a section. */
+    CTDT_LAYERROW,               /* Row in one layer within a section. */
+    CTDT_LAYERCOL,               /* Column in one layer within a section. */
+
+    /* Within a subtable, where a subtable pairs an innermost row variable with
+       an innermost column variable within a single layer.  */
+    CTDT_SUBTABLE,               /* Whole subtable. */
     CTDT_ROW,                    /* Row within a subtable. */
     CTDT_COL,                    /* Column within a subtable. */
-    CTDT_LAYER,                  /* Entire layer. */
-    CTDT_LAYERROW,               /* Row within a layer. */
-    CTDT_LAYERCOL,               /* Column within a layer. */
 #define N_CTDTS 7
   };
 
@@ -1929,8 +1934,6 @@ static struct ctables_domain *
 ctables_domain_insert (struct ctables_table *t, struct ctables_freq *f,
                        enum ctables_domain_type domain)
 {
-  /* XXX how can we handle CTDT_LAYERROW and CTDT_LAYERCOL?  Crossing subtables
-     is hard.  */
   size_t hash = 0;
   for (enum pivot_axis_type a = 0; a < PIVOT_N_AXES; a++)
     {