3#include <gsl/gsl_cdf.h>
15 map<string,CMBVectorSet>::operator=(mp);
22 for (map<string,CMBVectorSet>::const_iterator it = cbegin(); it!=cend();it++)
24 out[QString::fromStdString(it->first)]=it->second.toJsonObject();
30 for(QString key: jsonobject.keys() ) {
33 operator[](key.toStdString()) = column;
40 for (map<string,CMBVectorSet>::const_iterator it = cbegin(); it!=cend();it++)
52 for (map<string,CMBVectorSet>::const_iterator it = begin(); it!=end();it++)
54 if (it->second.MaxSize()>max_size)
55 max_size = it->second.MaxSize();
63 for (map<string,CMBVectorSet>::const_iterator it = cbegin(); it!=cend();it++)
65 out = std::max(out,it->second.max());
72 for (map<string,CMBVectorSet>::const_iterator it = cbegin(); it!=cend();it++)
74 out = std::min(out,it->second.min());
82 QTableWidget *tablewidget =
new QTableWidget();
83 tablewidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
87 tablewidget->setColumnCount(column_count*2);
88 tablewidget->setRowCount(
MaxSize());
89 QStringList rowheaders;
90 QStringList colheaders;
94 for (map<string,CMBVector>::iterator column=
vectorset->second.begin(); column!=
vectorset->second.end(); column++)
96 colheaders<<QString::fromStdString(
vectorset->first)+
":"+QString::fromStdString(column->first)<<QString::fromStdString(
vectorset->first)+
":"+QString::fromStdString(column->first)+
"-Value";
97 for (
int i=0; i<column->second.getsize(); i++)
99 tablewidget->setItem(i,colno*2,
new QTableWidgetItem(QString::fromStdString(column->second.Label(i))));
100 tablewidget->setItem(i,colno*2+1,
new QTableWidgetItem(QString::number(column->second[i])));
106 tablewidget->setHorizontalHeaderLabels(colheaders);
112 file->write(QString::fromStdString(
ToString()).toUtf8());
125 if (count(columnlabel)!=0)
132 return at(
vectorset).GetColumn(columnlabel);
136 this->operator[](columnlabel) =
vectorset;
Collection of named CMBVectorSet objects for hierarchical data organization.
double min() const
Finds the minimum value across all vectors in all sets.
CMBVector & GetColumn(const string &vectorset, const string &columnlabel)
Gets reference to a named column vector within a vector set.
double max() const
Finds the maximum value across all vectors in all sets.
string ToString() const override
Converts vector set set to string representation.
double valueAt(const string &vectorset, const string &columnlabel, int j) const
Gets value at specified position in a column within a vector set.
QTableWidget * ToTable() override
Creates a QTableWidget for displaying vector set set data.
bool ReadFromJsonObject(const QJsonObject &jsonobject) override
Deserializes vector set set from JSON format.
string Label(const string &vectorset, const string &column, int j) const
Gets label at specified position in a column within a vector set.
void Append(const string &columnlabel, const CMBVectorSet &vectorset)
Adds or replaces a vector set in the collection.
CMBVectorSetSet()
Default constructor - creates an empty vector set set.
unsigned int MaxSize() const
Finds the maximum size among all vectors in all sets.
bool writetofile(QFile *file) override
Writes vector set set to file.
QJsonObject toJsonObject() const override
Serializes vector set set to JSON format.
CMBVectorSetSet & operator=(const CMBVectorSetSet &mp)
Assignment operator.
Collection of named CMBVector objects for multi-variable analysis.
string ToString() const override
Converts vector set to string representation.
bool ReadFromJsonObject(const QJsonObject &jsonobject) override
Deserializes vector set from JSON format.
Vector class with string labels for Chemical Mass Balance analysis.
Abstract base class providing common serialization and visualization interface.
Interface & operator=(const Interface &intf)
Assignment operator.