SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
CMBVectorSetSet Class Reference

Collection of named CMBVectorSet objects for hierarchical data organization. More...

#include </home/runner/work/SedSat3/SedSat3/cmbvectorsetset.h>

Inheritance diagram for CMBVectorSetSet:
Inheritance graph
Collaboration diagram for CMBVectorSetSet:
Collaboration graph

Public Member Functions

 CMBVectorSetSet ()
 Default constructor - creates an empty vector set set.
 
 CMBVectorSetSet (const CMBVectorSetSet &mp)
 Copy constructor.
 
CMBVectorSetSetoperator= (const CMBVectorSetSet &mp)
 Assignment operator.
 
QJsonObject toJsonObject () const override
 Serializes vector set set to JSON format.
 
bool ReadFromJsonObject (const QJsonObject &jsonobject) override
 Deserializes vector set set from JSON format.
 
string ToString () const override
 Converts vector set set to string representation.
 
QTableWidget * ToTable () override
 Creates a QTableWidget for displaying vector set set data.
 
bool writetofile (QFile *file) override
 Writes vector set set to file.
 
string Label (const string &vectorset, const string &column, int j) const
 Gets label at specified position in a column within a vector set.
 
double valueAt (const string &vectorset, const string &columnlabel, int j) const
 Gets value at specified position in a column within a vector set.
 
CMBVectorGetColumn (const string &vectorset, const string &columnlabel)
 Gets reference to a named column vector within a vector set.
 
void Append (const string &columnlabel, const CMBVectorSet &vectorset)
 Adds or replaces a vector set in the collection.
 
unsigned int MaxSize () const
 Finds the maximum size among all vectors in all sets.
 
double max () const
 Finds the maximum value across all vectors in all sets.
 
double min () const
 Finds the minimum value across all vectors in all sets.
 
- Public Member Functions inherited from Interface
 Interface ()
 Default constructor.
 
 Interface (const Interface &intf)
 Copy constructor.
 
Interfaceoperator= (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 &note)
 Set the notes for this object, replacing any existing notes.
 
void AppendtoNotes (const string &note)
 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.
 
optionsGetOptions ()
 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.
 

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.
 

Detailed Description

Collection of named CMBVectorSet objects for hierarchical data organization.

Manages a two-level hierarchy of vectors: sets of vector sets. Provides JSON serialization and table generation for complex multi-group, multi-variable datasets. Commonly used for organizing discriminant function analysis results across multiple discriminant axes.

Definition at line 17 of file cmbvectorsetset.h.

Constructor & Destructor Documentation

◆ CMBVectorSetSet() [1/2]

CMBVectorSetSet::CMBVectorSetSet ( )

Default constructor - creates an empty vector set set.

Definition at line 5 of file cmbvectorsetset.cpp.

◆ CMBVectorSetSet() [2/2]

CMBVectorSetSet::CMBVectorSetSet ( const CMBVectorSetSet mp)

Copy constructor.

Parameters
mpVector set set to copy from

Definition at line 9 of file cmbvectorsetset.cpp.

Member Function Documentation

◆ Append()

void CMBVectorSetSet::Append ( const string columnlabel,
const CMBVectorSet vectorset 
)

Adds or replaces a vector set in the collection.

Parameters
columnlabelName for the vector set
vectorsetVector set to add

Definition at line 134 of file cmbvectorsetset.cpp.

References vectorset.

Referenced by SourceSinkData::DiscriminantFunctionAnalysis().

◆ GetColumn()

CMBVector & CMBVectorSetSet::GetColumn ( const string vectorset,
const string columnlabel 
)

Gets reference to a named column vector within a vector set.

Parameters
vectorsetName of the vector set
columnlabelName of the vector column
Returns
Reference to the CMBVector

Definition at line 130 of file cmbvectorsetset.cpp.

References vectorset.

◆ Label()

string CMBVectorSetSet::Label ( const string vectorset,
const string column,
int  j 
) const

Gets label at specified position in a column within a vector set.

Parameters
vectorsetName of the vector set
columnName of the vector column within the set
jIndex within the column
Returns
Label string, or empty string if not found

Definition at line 116 of file cmbvectorsetset.cpp.

References Label(), and vectorset.

Referenced by Label().

◆ max()

double CMBVectorSetSet::max ( ) const

Finds the maximum value across all vectors in all sets.

Returns
Maximum value found

Definition at line 60 of file cmbvectorsetset.cpp.

◆ MaxSize()

unsigned int CMBVectorSetSet::MaxSize ( ) const

Finds the maximum size among all vectors in all sets.

Returns
Maximum number of elements in any vector

Definition at line 49 of file cmbvectorsetset.cpp.

Referenced by ToTable().

◆ min()

double CMBVectorSetSet::min ( ) const

Finds the minimum value across all vectors in all sets.

Returns
Minimum value found

Definition at line 69 of file cmbvectorsetset.cpp.

◆ operator=()

CMBVectorSetSet & CMBVectorSetSet::operator= ( const CMBVectorSetSet mp)

Assignment operator.

Parameters
mpVector set set to assign from
Returns
Reference to this vector set set

Definition at line 13 of file cmbvectorsetset.cpp.

References Interface::operator=().

◆ ReadFromJsonObject()

bool CMBVectorSetSet::ReadFromJsonObject ( const QJsonObject &  jsonobject)
overridevirtual

Deserializes vector set set from JSON format.

Parameters
jsonobjectJSON object to read from
Returns
true if successful, false otherwise

Reimplemented from Interface.

Definition at line 28 of file cmbvectorsetset.cpp.

References CMBVectorSet::ReadFromJsonObject().

Referenced by Results::ReadFromJson().

◆ toJsonObject()

QJsonObject CMBVectorSetSet::toJsonObject ( ) const
overridevirtual

Serializes vector set set to JSON format.

Returns
JSON object containing all vector sets with their names as keys

Reimplemented from Interface.

Definition at line 19 of file cmbvectorsetset.cpp.

◆ ToString()

string CMBVectorSetSet::ToString ( ) const
overridevirtual

Converts vector set set to string representation.

Returns
String containing all vector sets with their names

Reimplemented from Interface.

Definition at line 37 of file cmbvectorsetset.cpp.

References CMBVectorSet::ToString().

Referenced by writetofile().

◆ ToTable()

QTableWidget * CMBVectorSetSet::ToTable ( )
overridevirtual

Creates a QTableWidget for displaying vector set set data.

Generates a table with column pairs for each vector in each set, with hierarchical column headers.

Returns
Pointer to newly created QTableWidget (caller takes ownership)

Reimplemented from Interface.

Definition at line 80 of file cmbvectorsetset.cpp.

References MaxSize(), and vectorset.

◆ valueAt()

double CMBVectorSetSet::valueAt ( const string vectorset,
const string columnlabel,
int  j 
) const

Gets value at specified position in a column within a vector set.

Parameters
vectorsetName of the vector set
columnlabelName of the vector column within the set
jIndex within the column
Returns
Value at position j, or 0 if not found

Definition at line 123 of file cmbvectorsetset.cpp.

References valueAt(), and vectorset.

Referenced by valueAt().

◆ writetofile()

bool CMBVectorSetSet::writetofile ( QFile *  file)
overridevirtual

Writes vector set set to file.

Parameters
fileFile pointer to write to
Returns
true if successful

Reimplemented from Interface.

Definition at line 110 of file cmbvectorsetset.cpp.

References ToString().


The documentation for this class was generated from the following files: