19#include "../Common/defines.h"
21#define PONCA_EXPLICIT_CAST_OPERATORS(CLASSNAME, CONVERTER) \
23 PONCA_MULTIARCH inline CLASSNAME<DataPoint, _NFilter, T>& CONVERTER() \
25 return *static_cast<CLASSNAME<DataPoint, _NFilter, T>*>(this); \
28 PONCA_MULTIARCH inline const CLASSNAME<DataPoint, _NFilter, T>& CONVERTER() const \
30 return *static_cast<const CLASSNAME<DataPoint, _NFilter, T>*>(this); \
35#define PONCA_EXPLICIT_CAST_OPERATORS_DER(CLASSNAME, CONVERTER) \
37 PONCA_MULTIARCH inline CLASSNAME<DataPoint, _NFilter, DiffType, T>& CONVERTER() \
39 return *static_cast<CLASSNAME<DataPoint, _NFilter, DiffType, T>*>(this); \
42 PONCA_MULTIARCH inline const CLASSNAME<DataPoint, _NFilter, DiffType, T>& CONVERTER() const \
44 return *static_cast<const CLASSNAME<DataPoint, _NFilter, DiffType, T>*>(this); \
50#define PONCA_FITTING_DECLARE_DEFAULT_TYPES \
54 using Scalar = typename DataPoint::Scalar; \
55 using VectorType = typename Base::VectorType; \
56 using NeighborFilter = typename Base::NeighborFilter;
59#define PONCA_FITTING_DECLARE_MATRIX_TYPE \
61 using MatrixType = typename DataPoint::MatrixType;
64#define PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES \
66 using ScalarArray = typename Base::ScalarArray; \
67 using VectorArray = typename Base::VectorArray;
70#define PONCA_FITTING_APIDOC_SETWFUNC \
73#define PONCA_FITTING_APIDOC_INIT \
76#define PONCA_FITTING_APIDOC_ADDNEIGHBOR
77#define PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER
78#define PONCA_FITTING_APIDOC_FINALIZE \
84#define PONCA_FITTING_IS_SIGNED(IS_SIGNED) \
86 PONCA_MULTIARCH inline constexpr bool isSigned() { return IS_SIGNED; }
89#define PONCA_FITTING_DECLARE_INIT \
90 PONCA_FITTING_APIDOC_INIT \
91 PONCA_MULTIARCH inline void init();
94#define PONCA_FITTING_DECLARE_ADDNEIGHBOR \
95 PONCA_FITTING_APIDOC_ADDNEIGHBOR \
96 PONCA_MULTIARCH inline void addLocalNeighbor(Scalar w, const VectorType& localQ, const DataPoint& attributes);
99#define PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
100 PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER \
101 PONCA_MULTIARCH inline void addLocalNeighbor(Scalar w, const VectorType& localQ, const DataPoint& attributes, \
105#define PONCA_FITTING_DECLARE_FINALIZE \
106 PONCA_FITTING_APIDOC_FINALIZE \
107 PONCA_MULTIARCH inline FIT_RESULT finalize();
109#define PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE \
110 PONCA_FITTING_DECLARE_INIT \
111 PONCA_FITTING_DECLARE_ADDNEIGHBOR \
112 PONCA_FITTING_DECLARE_FINALIZE
114#define PONCA_FITTING_DECLARE_INIT_ADDDER_FINALIZE \
115 PONCA_FITTING_DECLARE_INIT \
116 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
117 PONCA_FITTING_DECLARE_FINALIZE
122 template <
typename T,
typename =
void>
123 struct hasFirstFundamentalForm : std::false_type
127 template <
typename T>
128 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.