1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-07-31 13:57:05 +01:00

XY datatypes: tools to get residuals or partial residuals from a fit

This commit is contained in:
2015-07-07 18:50:03 +01:00
parent 59bb3fb78c
commit cebf2334fa
6 changed files with 167 additions and 44 deletions

View File

@@ -37,6 +37,7 @@ BEGIN_LATAN_NAMESPACE
class FitResult: public DVec
{
friend class XYStatData;
friend class SampleFitResult;
public:
// constructors
FitResult(void) = default;
@@ -56,7 +57,9 @@ private:
/******************************************************************************
* object for X vs. Y statistical data *
******************************************************************************/
******************************************************************************
* index convention: i: X, j: Y, k: data
*/
class XYStatData: public FitInterface
{
public:
@@ -112,6 +115,10 @@ public:
template <typename... Ts>
FitResult fit(Minimizer &minimizer, const DVec &init,
const DoubleModel &model, const Ts... models);
// residuals
XYStatData getResiduals(const FitResult &fit) const;
XYStatData getPartialResiduals(const FitResult &fit, const DVec &x,
const Index j) const;
private:
DMat x_, y_;