10#include "../../defines.h"
11#include "../concepts.h"
13#include "../primitive/linePrimitive.h"
14#include "../tools/mean.h"
15#include "../tools/covariance.h"
19#define COVARIANCE_LINE_FIT_REQUIREMENTS ProvidesPositionCovariance<T>&& ProvidesLine<T>
37 template <
class DataPo
int,
class _NFilter,
typename T>
38 requires COVARIANCE_LINE_FIT_REQUIREMENTS
41 PONCA_FITTING_DECLARE_DEFAULT_TYPES
42 PONCA_FITTING_DECLARE_MATRIX_TYPE
46 PONCA_FITTING_APIDOC_FINALIZE
50 if (Base::finalize() ==
STABLE)
52 if (Base::line().isValid())
54 Base::setLine(Base::barycenterLocal(),
57 return Base::m_eCurrentState;
59 PONCA_FITTING_IS_SIGNED(
false)
63 template <
class DataPo
int,
class _NFilter,
typename T>
Aggregator class used to declare specialized structures using CRTP.
Line fitting procedure that minimize the orthogonal distance between the samples and the fitted primi...
FIT_RESULT finalize()
Finalize the procedure.
CovarianceLineFitImpl< DataPoint, _NFilter, T > & covarianceLineFit()
Explicit conversion to CovarianceLineFitImpl , to access methods potentially hidden by heritage.
This Source Code Form is subject to the terms of the Mozilla Public License, v.
FIT_RESULT
Enum corresponding to the state of a fitting method (and what the finalize function returns)
@ CONFLICT_ERROR_FOUND
Multiple classes of the fitting procedure initialize the primitive.
@ STABLE
The fitting is stable and ready to use.