9#include "../../defines.h"
10#include "../concepts.h"
13#define GLS_PARAM_REQUIREMENTS ProvidesAlgebraicSphere<T>
16#define GLS_DER_REQUIREMENTS ProvidesAlgebraicSphere<T>&& ProvidesImplicitPrimitiveDerivative<T>&& ProvidesGLSParam<T>
47 template <
class DataPo
int,
class _NFilter,
typename T>
48 requires GLS_PARAM_REQUIREMENTS
52 PONCA_FITTING_DECLARE_DEFAULT_TYPES
58 PONCA_FITTING_DECLARE_FINALIZE
64 PONCA_MULTIARCH [[nodiscard]]
inline Scalar tau()
const
66 return Base::isNormalized() ? Base::m_uc : Base::m_uc / Base::prattNorm();
70 PONCA_MULTIARCH [[nodiscard]]
inline VectorType eta()
const {
return Base::primitiveGradient(); }
75 return Scalar(2.) * (Base::isNormalized() ? Base::m_uq : Base::m_uq / Base::prattNorm());
81 return tau() / Base::getNeighborFilter().evalScale();
90 return kappa() * Base::getNeighborFilter().evalScale();
102 bool _useFitness =
true)
const
108 return nTau * nTau + nKappa * nKappa + nFitness * nFitness;
119 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
120 requires GLS_DER_REQUIREMENTS
123 PONCA_FITTING_DECLARE_DEFAULT_TYPES
124 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
Differentiation of GLSParam.
GLSDer< DataPoint, _NFilter, DiffType, T > & geomVar()
Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.
GLSDer< DataPoint, _NFilter, DiffType, T > & glsDer()
Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.
ScalarArray dtau() const
Compute and return derivatives.
ScalarArray dkappa() const
Compute and return derivatives.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
ScalarArray dtau_normalized() const
Compute and return derivatives.
VectorArray deta_normalized() const
Compute and return .
VectorArray deta() const
Compute and return derivatives.
ScalarArray dkappa_normalized() const
Compute and return .
typename DataPoint::Scalar Scalar
Alias to scalar type.
Growing Least Squares reparametrization of the OrientedSphereFit.
VectorType eta() const
Compute and return .
GLSParam< DataPoint, _NFilter, T > & glsParam()
Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.
typename DataPoint::Scalar Scalar
Alias to scalar type.
Scalar kappa() const
Compute and return .
Scalar tau_normalized() const
Compute and return .
VectorType eta_normalized() const
Compute and return .
Scalar tau() const
Compute and return .
Scalar kappa_normalized() const
Compute and return .
Scalar compareTo(const GLSParam< DataPoint, _NFilter, T > &_other, bool _useFitness=true) const
Compare current instance with other.
Scalar m_fitness
Save the fitness value to avoid side effect with Pratt normalization.
typename Base::VectorType VectorType
Alias to vector type.
Scalar fitness() const
Return the fitness, e.g.
This Source Code Form is subject to the terms of the Mozilla Public License, v.