-/* Algorithm:
-
- For each row:
- For each ctables_table:
- For each combination of row vars:
- For each combination of column vars:
- For each combination of layer vars:
- Add entry
- Make a table of row values:
- Sort entries by row values
- Assign a 0-based index to each actual value
- Construct a dimension
- Make a table of column values
- Make a table of layer values
- For each entry:
- Fill the table entry using the indexes from before.
- */
-