22#ifndef ELEMENTAL_PROFILE_H
23#define ELEMENTAL_PROFILE_H
316 const map<string, element_information>* elementinfo =
nullptr)
const;
326 const map<string, element_information>* elementinfo,
327 bool include_isotopes =
false)
const;
366 const vector<double>& reference_om_size,
368 const map<string, element_information>* elementinfo =
nullptr)
const;
385 bool exclude_elements,
386 bool apply_corrections,
387 const vector<double>& reference_om_size,
389 const map<string, element_information>* elementinfo =
nullptr)
const;
428 QTableWidget*
ToTable()
override;
449 bool Read(
const QStringList& string_list)
override;
Vector class with string labels for Chemical Mass Balance analysis.
Container for elemental concentration data of a single sediment sample.
Elemental_Profile & operator=(const Elemental_Profile &other)
Copy assignment operator.
Elemental_Profile CreateAnalysisProfile(const map< string, element_information > *elementinfo=nullptr) const
Create profile with only analyzed elements.
Elemental_Profile ExtractChemicalElements(const map< string, element_information > *elementinfo, bool include_isotopes=false) const
Extract chemical elements only (exclude isotopes, metadata)
Elemental_Profile ExtractElements(const vector< string > &element_names) const
Extract subset of specified elements.
Elemental_Profile ApplyOrganicMatterAndSizeCorrections(const vector< double > &reference_om_size, const MultipleLinearRegressionSet *regression_models, const map< string, element_information > *elementinfo=nullptr) const
Apply organic matter and particle size corrections.
bool IsMarked(const string &name) const
Check if element is marked.
map< string, bool > marked_elements_
Map tracking marked elements for quality control.
double GetMaximum() const
Get maximum concentration value.
vector< string > GetElementNames() const
Get list of all element names.
double CalculateDotProduct(const CMBVector &weights) const
Calculate dot product with weight vector.
CMBVector SortByConcentration(bool ascending=true) const
Sort elements by concentration value.
bool included_in_analysis_
Whether profile should be included in analysis.
double GetMinimum() const
Get minimum concentration value.
vector< double > GetAllValues() const
Get all concentration values as vector.
bool SetMarked(const string &name, bool marked)
Set marked status for an element.
QTableWidget * ToTable() override
Create Qt table widget representation.
void SetIncludedInAnalysis(bool included)
Set analysis inclusion status.
Elemental_Profile CreateCorrectedProfile(bool exclude_elements, bool apply_corrections, const vector< double > &reference_om_size, const MultipleLinearRegressionSet *regression_models=nullptr, const map< string, element_information > *elementinfo=nullptr) const
Create corrected profile with filtering and corrections.
bool AppendElement(const string &name, double val=0.0)
Add new element to profile.
double GetValue(const string &name) const
Get element concentration by name.
vector< string > SelectTopElements(int n, bool ascending=true) const
Select top N elements by concentration.
Elemental_Profile()
Default constructor - creates empty profile.
string ToString() const override
Convert profile to string representation.
bool writetofile(QFile *file) override
Write profile to file.
bool ReadFromJsonObject(const QJsonObject &json) override
Deserialize from JSON object.
QJsonObject toJsonObject() const override
Serialize to JSON object.
bool IsIncludedInAnalysis() const
Check if profile is included in analysis.
bool SetValue(const string &name, double val)
Set concentration value for existing element.
std::unique_ptr< QTableWidget > CreateTableUnique() const
Create table widget with automatic memory management.
bool Read(const QStringList &string_list) override
Read profile from string list.
bool Contains(const string &name) const
Check if element exists in profile.
Abstract base class providing common serialization and visualization interface.