37 mat projected_data, fractional_abundances, endmember_spectra, indices_mat;
43 fractional_abundances);
44 indices_mat.set_size(indices.n_elem, 1);
46 for (uword i = 0; i < indices.n_elem; ++i)
47 indices_mat(i, 0) = indices(i);
49 QStringList em_col_headings;
50 for (uword i = 1; i <= uword(endmembers); ++i)
51 em_col_headings <<
"Endmember " + QString::number(i);
53 AddMetadata(
"Endmembers calculated", QString::number(endmembers));
54 AddMatrix(
"Endmembers", endmember_spectra, em_col_headings);
55 AddMatrix(
"Fractional Abundances", fractional_abundances, em_col_headings);
56 AddMatrix(
"Pure Pixel Indices", indices_mat, QStringList());
57 AddMatrix(
"Projected Data", projected_data, QStringList());
void AddMetadata(QString key, QString value)
VESPUCCI_EXPORT bool VCA(const arma::mat &R, arma::uword p, arma::uvec &indices, arma::mat &endmember_spectra, arma::mat &projected_data, arma::mat &fractional_abundances)
Vespucci::Math::DimensionReduction::VCA Vertex Component Analysis.
void AddMatrix(const QString &key, const mat &value, QStringList column_headings=QStringList())
void Apply(const mat &spectra, int endmembers)
VCAData::Apply Performs vertex component analysis on this object.
The AnalysisResults class A container for a mat object that allows a mat to be copied to a heap-alloc...