Virtual DataSets

Since DataSources and DataSets are sufficiently abstract, it would be possible to define a 'virtual data source' which does not have a storage backend. Instead, it could be a repository for DataSets derived from other DataSets. For example, a VirtualDataSource would know how to create a SmoothedDataSet based on some other DataSet from another DataSource. The SmoothedDataSet applies some smoothing operation to the input DataSet. The rest of the GUI and plotting does not need to change to be able to draw a SmoothedDataSet, and the SmoothedDataSet makes sure its input DataSets are updated (just like a Plot would) before recalculating its own data. DataSets can be chained into multiple derivation steps and any of the steps along the way selected for plotting.

To allow DataSet chaining, a getDataSets() method could be added to the DataSet class. For a Plot to fill in its list of required DataSets, it passes a vector into each of its DataSets, and the DataSets in turn fill in their own dependents. The Plot need not know how many DataSets it depends on, it just fills in the list and passes it back up the chain to PlotPage, which passes those DataSets on to the DataStore.

This idea is developed further here: the section called “Data-Driven Models”.