7template <
class DataPo
int,
class _NFilter,
typename T>
8 requires GLS_PARAM_REQUIREMENTS
15 m_fitness =
Scalar(1.) - Base::prattNorm2();
21template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
22 requires GLS_DER_REQUIREMENTS
25 PONCA_MULTIARCH_STD_MATH(
sqrt);
27 Scalar prattNorm2 = Base::prattNorm2();
33 if (Base::isSpaceDer())
36 return (
dfield * prattNorm - Base::m_uc *
cfactor * Base::dprattNorm2()) / prattNorm2;
39template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
40 requires GLS_DER_REQUIREMENTS
43 return Base::dNormal();
46template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
47 requires GLS_DER_REQUIREMENTS
50 PONCA_MULTIARCH_STD_MATH(
sqrt);
52 Scalar prattNorm2 = Base::prattNorm2();
56 return Scalar(2.) * (Base::m_dUq * prattNorm - Base::m_uq *
cfactor * Base::dprattNorm2()) / prattNorm2;
59template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
60 requires GLS_DER_REQUIREMENTS
62 T>::dtau_normalized()
const
67template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
68 requires GLS_DER_REQUIREMENTS
70 T>::deta_normalized()
const
72 return Base::getNeighborFilter().evalScale() * deta();
75template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
76 requires GLS_DER_REQUIREMENTS
78 T>::dkappa_normalized()
const
80 return dkappa() * Base::getNeighborFilter().evalScale() * Base::getNeighborFilter().evalScale();
83template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
84 requires GLS_DER_REQUIREMENTS
89 Scalar dtau = dtau_normalized().col(0)(0);
90 Scalar deta = deta_normalized().col(0).norm();
91 Scalar dkappa = dkappa_normalized().col(0)(0);
93 return wtau * dtau * dtau +
weta * deta * deta +
wkappa * dkappa * dkappa;
Aggregator class used to declare specialized structures using CRTP.
Differentiation of GLSParam.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
typename DataPoint::Scalar Scalar
Alias to scalar type.
Growing Least Squares reparametrization of the OrientedSphereFit.
typename DataPoint::Scalar Scalar
Alias to scalar type.
DiffType
Flags defining which derivatives need to be computed.
@ FitScaleDer
Flag indicating a scale differentiation.
FIT_RESULT
Enum corresponding to the state of a fitting method (and what the finalize function returns)
@ UNDEFINED
The fitting is undefined, you can't use it for valid results.