|
SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
|
Collection of time series with labels and observed values. More...
#include </home/runner/work/SedSat3/SedSat3/cmbtimeseriesset.h>


Public Member Functions | |
| CMBTimeSeriesSet () | |
| Default constructor - creates an empty time series set. | |
| CMBTimeSeriesSet (int n) | |
| Constructs a time series set with given capacity. | |
| CMBTimeSeriesSet (int n, int m) | |
| Constructs with specified number of series and points. | |
| CMBTimeSeriesSet (const CMBTimeSeriesSet &mp) | |
| Copy constructor from CMBTimeSeriesSet. | |
| CMBTimeSeriesSet & | operator= (const CMBTimeSeriesSet &mp) |
| Assignment operator from CMBTimeSeriesSet. | |
| CMBTimeSeriesSet & | operator= (const TimeSeriesSet< double > &mp) |
| Assignment operator from base TimeSeriesSet. | |
| CMBTimeSeriesSet (const TimeSeriesSet< double > &mp) | |
| Constructs from base TimeSeriesSet. | |
| QJsonObject | toJsonObject () const override |
| Serializes time series set to JSON format. | |
| bool | ReadFromJsonObject (const QJsonObject &jsonobject) override |
| Deserializes time series set from JSON format. | |
| string | ToString () const override |
| Converts time series set to CSV-formatted string. | |
| bool | writetofile (QFile *) override |
| Writes time series set to file. | |
| QTableWidget * | ToTable () override |
| Creates a QTableWidget for displaying time series set data. | |
| void | AppendLastContribution (int colnumber, const string &name) |
| Appends a final contribution series calculated from existing series. | |
| void | SetObservedValue (int i, const double &value) |
| Sets observed value for comparison at specified index. | |
| double | ObservedValue (int i) |
| Gets observed value at specified index. | |
| double | ObservedValue (string variable_name) |
| Gets observed value for named series. | |
| string | Label (unsigned int i) const |
| Gets label for time point (uses custom labels if set) | |
| string | Label (unsigned int i, unsigned int j) const |
| Gets label for time point in specific series. | |
| void | SetLabel (unsigned int i, const string &label) |
| Sets custom label for time point. | |
Public Member Functions inherited from Interface | |
| Interface () | |
| Default constructor. | |
| Interface (const Interface &intf) | |
| Copy constructor. | |
| Interface & | operator= (const Interface &intf) |
| Assignment operator. | |
| virtual bool | Read (const QStringList &strlist) |
| Parse object data from a string list. | |
| string | GetNotes () const |
| Get the notes/annotations associated with this object. | |
| void | SetNotes (const string ¬e) |
| Set the notes for this object, replacing any existing notes. | |
| void | AppendtoNotes (const string ¬e) |
| Append a note to existing notes. | |
| void | ClearNotes () |
| Clear all notes associated with this object. | |
| void | SetLimit (_range lowhigh, const double &value) |
| Set upper or lower limit for value highlighting. | |
| void | SetOption (options_key opt, bool val) |
| Set a configuration option. | |
| bool | Option (options_key opt) |
| Get the current value of a configuration option. | |
| options & | GetOptions () |
| Get reference to the options structure. | |
| QString | XAxisLabel () const |
| Get the X-axis label. | |
| QString | YAxisLabel () const |
| Get the Y-axis label. | |
| bool | SetXAxisLabel (const QString &label) |
| Set the X-axis label. | |
| bool | SetYAxisLabel (const QString &label) |
| Set the Y-axis label. | |
Private Attributes | |
| vector< double > | observed_value |
| Observed values for comparison with modeled series. | |
| vector< string > | labels |
| Custom labels for time points. | |
Additional Inherited Members | |
Public Attributes inherited from Interface | |
| double | lowlimit |
| Lower threshold for value highlighting (when enabled) | |
| double | highlimit |
| Upper threshold for value highlighting (when enabled) | |
| bool | highlightoutsideoflimit = false |
| Flag indicating whether to highlight values outside defined limits. | |
Collection of time series with labels and observed values.
Extends TimeSeriesSet<double> with custom labels for time points, observed values for comparison, JSON serialization, and table generation. Used for organizing multiple time series data such as contribution time series from different sources or fitted vs observed distributions.
Definition at line 16 of file cmbtimeseriesset.h.
| CMBTimeSeriesSet::CMBTimeSeriesSet | ( | ) |
Default constructor - creates an empty time series set.
Definition at line 6 of file cmbtimeseriesset.cpp.
| CMBTimeSeriesSet::CMBTimeSeriesSet | ( | int | n | ) |
Constructs a time series set with given capacity.
| n | Initial number of series |
Definition at line 17 of file cmbtimeseriesset.cpp.
References observed_value.
| CMBTimeSeriesSet::CMBTimeSeriesSet | ( | int | n, |
| int | m | ||
| ) |
Constructs with specified number of series and points.
| n | Number of series |
| m | Number of points per series |
| CMBTimeSeriesSet::CMBTimeSeriesSet | ( | const CMBTimeSeriesSet & | mp | ) |
Copy constructor from CMBTimeSeriesSet.
| mp | Time series set to copy from |
Definition at line 11 of file cmbtimeseriesset.cpp.
References labels, and observed_value.
| CMBTimeSeriesSet::CMBTimeSeriesSet | ( | const TimeSeriesSet< double > & | mp | ) |
Constructs from base TimeSeriesSet.
| mp | Time series set to copy from |
Definition at line 36 of file cmbtimeseriesset.cpp.
References observed_value.
| void CMBTimeSeriesSet::AppendLastContribution | ( | int | colnumber, |
| const string & | name | ||
| ) |
Appends a final contribution series calculated from existing series.
Calculates the remaining contribution (1 - sum of first colnumber series) and inserts it at position colnumber in the set.
| colnumber | Number of existing contribution series |
| name | Name for the final contribution series |
Definition at line 137 of file cmbtimeseriesset.cpp.
References name.
|
inline |
Gets label for time point (uses custom labels if set)
| i | Time point index |
Definition at line 155 of file cmbtimeseriesset.h.
References labels.
Referenced by GeneralChart::PlotTimeSeriesSet_A(), GeneralChart::PlotTimeSeriesSet_M(), GeneralChart::PlotTimeSeriesSet_Stacked(), toJsonObject(), ToString(), and ToTable().
|
inline |
Gets label for time point in specific series.
| i | Time point index |
| j | Series index |
Definition at line 171 of file cmbtimeseriesset.h.
References labels.
|
inline |
Gets observed value at specified index.
| i | Series index |
Definition at line 127 of file cmbtimeseriesset.h.
References observed_value.
Referenced by GeneralChart::PlotDistribution().
|
inline |
Gets observed value for named series.
| variable_name | Name of the series |
Definition at line 140 of file cmbtimeseriesset.h.
References observed_value.
| CMBTimeSeriesSet & CMBTimeSeriesSet::operator= | ( | const CMBTimeSeriesSet & | mp | ) |
Assignment operator from CMBTimeSeriesSet.
| mp | Time series set to assign from |
Definition at line 22 of file cmbtimeseriesset.cpp.
References labels, and observed_value.
| CMBTimeSeriesSet & CMBTimeSeriesSet::operator= | ( | const TimeSeriesSet< double > & | mp | ) |
Assignment operator from base TimeSeriesSet.
| mp | Time series set to assign from |
Definition at line 30 of file cmbtimeseriesset.cpp.
References observed_value.
|
overridevirtual |
Deserializes time series set from JSON format.
| jsonobject | JSON object to read from |
Reimplemented from Interface.
Definition at line 71 of file cmbtimeseriesset.cpp.
References labels, and observed_value.
Referenced by Results::ReadFromJson().
|
inline |
Sets custom label for time point.
| i | Time point index |
| label | Label string to set |
Definition at line 186 of file cmbtimeseriesset.h.
References labels.
Referenced by SourceSinkData::LM_Batch(), and SourceSinkData::VerifySource().
|
inline |
Sets observed value for comparison at specified index.
| i | Series index |
| value | Observed value |
Definition at line 116 of file cmbtimeseriesset.h.
References observed_value.
Referenced by SourceSinkData::MCMC().
|
overridevirtual |
Serializes time series set to JSON format.
Reimplemented from Interface.
Definition at line 41 of file cmbtimeseriesset.cpp.
References Label(), labels, observed_value, and timeseries.
|
overridevirtual |
Converts time series set to CSV-formatted string.
Reimplemented from Interface.
Definition at line 105 of file cmbtimeseriesset.cpp.
References Label().
Referenced by writetofile().
|
overridevirtual |
Creates a QTableWidget for displaying time series set data.
Generates either a table with separate time columns for each series, or a single time column with multiple value columns, depending on the single_column_x option.
Reimplemented from Interface.
Definition at line 167 of file cmbtimeseriesset.cpp.
References Interface::GetOptions(), Label(), Interface::Option(), single_column_x, options::X_suffix, and options::Y_suffix.
|
overridevirtual |
Writes time series set to file.
| file | File pointer to write to |
Reimplemented from Interface.
Definition at line 131 of file cmbtimeseriesset.cpp.
References ToString().
Custom labels for time points.
Definition at line 199 of file cmbtimeseriesset.h.
Referenced by CMBTimeSeriesSet(), Label(), Label(), operator=(), ReadFromJsonObject(), SetLabel(), and toJsonObject().
|
private |
Observed values for comparison with modeled series.
Definition at line 198 of file cmbtimeseriesset.h.
Referenced by CMBTimeSeriesSet(), CMBTimeSeriesSet(), CMBTimeSeriesSet(), ObservedValue(), ObservedValue(), operator=(), operator=(), ReadFromJsonObject(), SetObservedValue(), and toJsonObject().