WSL/SLF GitLab Repository

Commit 6ddfd8fc authored by Mathias Bavay's avatar Mathias Bavay
Browse files

One of the last commits was just wrong: adding a boolean and a string should...

One of the last commits was just wrong: adding a boolean and a string should not be possible! This has been fixed.
parent ea18b7b7
......@@ -174,7 +174,7 @@ void InterpolationAlgorithm::getTrend(const std::vector<double>& vecAltitudes, c
const double avgData = Interpol1D::arithmeticMean(vecDat);
trend.setLapseRate(lapse_rate*avgData);
status = trend.fit();
if (lapse_rate*avgData==0.) status += " (null average input for frac lapse rate)";
if (lapse_rate*avgData==0.) trend.setInfo(trend.getInfo() + " (null average input for frac lapse rate)");
} else {
throw InvalidArgumentException("Unknown argument \""+extraArg+"\" supplied for the "+algo+" algorithm", AT);
}
......
......@@ -233,6 +233,14 @@ class Fit1D {
*/
std::string getInfo() const {return model->getInfo();};
/**
* @brief Set the information string.
* This is useful to append some extra information to the information string.
* This should be called <b>after</b> computing the fit (otherwise it will be overwritten).
* @param info string
*/
void setInfo(const std::string& info) {model->setInfo(info);};
Fit1D& operator =(const Fit1D& source);
/**
......
......@@ -39,6 +39,7 @@ class FitModel {
void getParams(std::vector<double>& o_coefficients) const;
std::string getName() const {return regname;};
std::string getInfo() const;
void setInfo(const std::string& info) {infoString=info;};
FitModel& operator =(const FitModel& source);
std::string toString() const;
protected:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment