7template <
class DataPo
int,
class _WFunctor,
typename T>
15 m_fitness =
Scalar(1.) - Base::prattNorm2();
21template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
22typename GLSDer <DataPoint, _WFunctor, DiffType, T>::ScalarArray
23GLSDer <DataPoint, _WFunctor, DiffType, T>::dtau()
const
25 PONCA_MULTIARCH_STD_MATH(sqrt);
27 Scalar prattNorm2 = Base::prattNorm2();
28 Scalar prattNorm = sqrt(prattNorm2);
33 if(this->isSpaceDer())
34 dfield.template tail<DataPoint::Dim>() += Base::m_ul;
36 return (dfield * prattNorm - Base::m_uc * cfactor * Base::dprattNorm2()) / prattNorm2;
40template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
41typename GLSDer <DataPoint, _WFunctor, DiffType, T>::VectorArray
42GLSDer <DataPoint, _WFunctor, DiffType, T>::deta()
const
44 return Base::dNormal();
48template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
49typename GLSDer <DataPoint, _WFunctor, DiffType, T>::ScalarArray
50GLSDer <DataPoint, _WFunctor, DiffType, T>::dkappa()
const
52 PONCA_MULTIARCH_STD_MATH(sqrt);
54 Scalar prattNorm2 = Base::prattNorm2();
55 Scalar prattNorm = sqrt(prattNorm2);
58 return Scalar(2.) * (Base::m_dUq * prattNorm - Base::m_uq * cfactor * Base::dprattNorm2()) / prattNorm2;
62template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
63typename GLSDer <DataPoint, _WFunctor, DiffType, T>::ScalarArray
64GLSDer <DataPoint, _WFunctor, DiffType, T>::dtau_normalized()
const
70template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
71typename GLSDer <DataPoint, _WFunctor, DiffType, T>::VectorArray
72GLSDer <DataPoint, _WFunctor, DiffType, T>::deta_normalized()
const
74 return Base::m_w.evalScale() * deta();
78template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
79typename GLSDer <DataPoint, _WFunctor, DiffType, T>::ScalarArray
80GLSDer <DataPoint, _WFunctor, DiffType, T>::dkappa_normalized()
const
82 return dkappa() * Base::m_w.evalScale() * Base::m_w.evalScale();
88template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
89typename GLSDer <DataPoint, _WFunctor, DiffType, T>::Scalar
90GLSDer <DataPoint, _WFunctor, DiffType, T>::geomVar(
Scalar wtau,
94 static_assert( bool(
DiffType &
FitScaleDer),
"Scale derivatives are required to compute Geometric Variation" );
95 Scalar dtau = dtau_normalized().col(0)(0);
96 Scalar deta = deta_normalized().col(0).norm();
97 Scalar dkappa = dkappa_normalized().col(0)(0);
99 return wtau*dtau*dtau + weta*deta*deta + wkappa*dkappa*dkappa;
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
typename DataPoint::Scalar Scalar
Alias to scalar type.
Growing Least Squares reparemetrization 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.