Finish converting calcstate to use DataSet/DataFile framework, add data file 'groupby' options #635
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This finishes the conversion to DataSet/DataFile framework for
calcstate
begun in #629, converting the transitions data into DataSets that can use DataFiles. Since the transitions have a different dimension than the states data (there is more transition data than state data), this PR also adds an option to standard data file writes to group data in different ways.The
groupby
option controls what data goes side by side in standard data file output. For example, normally all data sets in a standard data file are printed in columns - if a data set does not contain data for a given index, a default blank value is printed. For example, if runningcalcstate
with 2 states, the state data will have size 3 (the 2 states and Undefined) while the transitions will probably be larger.The output file may look like so:
Here the state data was size 3, but the transitions data was size 4, so for the last line the state data is all 0 and the state name is
NoData
(blank string value). This doesn't look nice. It makes more sense in this case to group by dimension.Now the output file looks like this:
Much easier to read.