20#include "../Common/defines.h"
22#define PONCA_EXPLICIT_CAST_OPERATORS(CLASSNAME,CONVERTER) \
24PONCA_MULTIARCH inline \
25CLASSNAME<DataPoint, _NFilter, T>& CONVERTER() \
26{ return * static_cast<CLASSNAME<DataPoint, _NFilter, T>*>(this); } \
28PONCA_MULTIARCH inline \
29const CLASSNAME<DataPoint, _NFilter, T>& CONVERTER() const \
30{ return * static_cast<const CLASSNAME<DataPoint, _NFilter, T>*>(this); }
34#define PONCA_EXPLICIT_CAST_OPERATORS_DER(CLASSNAME,CONVERTER) \
36PONCA_MULTIARCH inline \
37CLASSNAME<DataPoint, _NFilter, DiffType, T>& CONVERTER() \
38{ return * static_cast<CLASSNAME<DataPoint, _NFilter, DiffType, T>*>(this); } \
40PONCA_MULTIARCH inline \
41const CLASSNAME<DataPoint, _NFilter, DiffType, T>& CONVERTER() const \
42{ return * static_cast<const CLASSNAME<DataPoint, _NFilter, DiffType, T>*>(this); }
48#define PONCA_FITTING_DECLARE_DEFAULT_TYPES \
52using Scalar = typename DataPoint::Scalar; \
53using VectorType = typename Base::VectorType; \
54using NeighborFilter = typename Base::NeighborFilter;
57#define PONCA_FITTING_DECLARE_MATRIX_TYPE \
59using MatrixType = typename DataPoint::MatrixType; \
62#define PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES \
64using ScalarArray = typename Base::ScalarArray; \
65using VectorArray = typename Base::VectorArray;
68#define PONCA_FITTING_APIDOC_SETWFUNC \
70#define PONCA_FITTING_APIDOC_INIT \
72#define PONCA_FITTING_APIDOC_ADDNEIGHBOR \
74#define PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER \
76#define PONCA_FITTING_APIDOC_FINALIZE \
82#define PONCA_FITTING_IS_SIGNED(IS_SIGNED) \
84PONCA_MULTIARCH inline \
85constexpr bool isSigned() { return IS_SIGNED; }
88#define PONCA_FITTING_DECLARE_INIT \
89PONCA_FITTING_APIDOC_INIT \
90PONCA_MULTIARCH inline void init ();
93#define PONCA_FITTING_DECLARE_ADDNEIGHBOR \
94PONCA_FITTING_APIDOC_ADDNEIGHBOR \
95PONCA_MULTIARCH inline bool addLocalNeighbor(Scalar w, const VectorType &localQ, const DataPoint &attributes);
98#define PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
99PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER \
100PONCA_MULTIARCH inline bool \
101addLocalNeighbor(Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw);
104#define PONCA_FITTING_DECLARE_FINALIZE \
105PONCA_FITTING_APIDOC_FINALIZE \
106PONCA_MULTIARCH inline FIT_RESULT finalize();
108#define PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE \
109PONCA_FITTING_DECLARE_INIT \
110PONCA_FITTING_DECLARE_ADDNEIGHBOR \
111PONCA_FITTING_DECLARE_FINALIZE
113#define PONCA_FITTING_DECLARE_INIT_ADDDER_FINALIZE \
114PONCA_FITTING_DECLARE_INIT \
115PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
116PONCA_FITTING_DECLARE_FINALIZE
121 template <
typename T,
typename =
void>
122 struct hasFirstFundamentalForm : std::false_type {};
124 template <
typename T>
125 struct hasFirstFundamentalForm<T, std::void_t<decltype(std::declval<T>().firstFundamentalForm())>> : std::true_type {};
This Source Code Form is subject to the terms of the Mozilla Public License, v.