19#include "../Common/defines.h"
21#define PONCA_EXPLICIT_CAST_OPERATOR(CONVERTER, ...) \
23 PONCA_MULTIARCH inline __VA_ARGS__& CONVERTER() { return *static_cast<__VA_ARGS__*>(this); } \
25 PONCA_MULTIARCH inline const __VA_ARGS__& CONVERTER() const { return *static_cast<const __VA_ARGS__*>(this); }
27#define PONCA_EXPLICIT_BASKET_CAST_OPERATORS(CLASSNAME, CONVERTER) \
28 PONCA_EXPLICIT_CAST_OPERATOR(CONVERTER, CLASSNAME<DataPoint, _NFilter, T>)
32#define PONCA_EXPLICIT_BASKET_CAST_OPERATORS_DER(CLASSNAME, CONVERTER) \
33 PONCA_EXPLICIT_CAST_OPERATOR(CONVERTER, CLASSNAME<DataPoint, _NFilter, DiffType, T>)
38#define PONCA_FITTING_DECLARE_DEFAULT_TYPES \
42 using Scalar = typename DataPoint::Scalar; \
43 using VectorType = typename Base::VectorType; \
44 using NeighborFilter = typename Base::NeighborFilter;
47#define PONCA_FITTING_DECLARE_MULTIPASS_TYPES \
49 using Base = MultipassStatus<DataPoint, _NFilter, T>; \
50 using Status = Base; \
52 using Scalar = typename DataPoint::Scalar; \
53 using VectorType = typename Base::VectorType; \
54 using NeighborFilter = typename Base::NeighborFilter;
57#define PONCA_FITTING_DECLARE_MATRIX_TYPE \
59 using MatrixType = typename DataPoint::MatrixType;
62#define PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES \
64 using ScalarArray = typename Base::ScalarArray; \
65 using VectorArray = typename Base::VectorArray;
68#define PONCA_FITTING_APIDOC_SETWFUNC
71#define PONCA_FITTING_APIDOC_INIT
74#define PONCA_FITTING_APIDOC_ADDNEIGHBOR
75#define PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER
76#define PONCA_FITTING_APIDOC_FINALIZE
82#define PONCA_FITTING_IS_SIGNED(IS_SIGNED) \
84 PONCA_MULTIARCH inline constexpr bool isSigned() { return IS_SIGNED; }
87#define PONCA_FITTING_DECLARE_INIT \
88 PONCA_FITTING_APIDOC_INIT \
89 PONCA_MULTIARCH inline void init();
92#define PONCA_FITTING_DECLARE_ADDNEIGHBOR \
93 PONCA_FITTING_APIDOC_ADDNEIGHBOR \
94 PONCA_MULTIARCH inline void addLocalNeighbor(Scalar w, const VectorType& localQ, const DataPoint& attributes);
97#define PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
98 PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER \
99 PONCA_MULTIARCH inline void addLocalNeighbor(Scalar w, const VectorType& localQ, const DataPoint& attributes, \
103#define PONCA_FITTING_DECLARE_FINALIZE \
104 PONCA_FITTING_APIDOC_FINALIZE \
105 PONCA_MULTIARCH inline FIT_RESULT finalize();
107#define PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE \
108 PONCA_FITTING_DECLARE_INIT \
109 PONCA_FITTING_DECLARE_ADDNEIGHBOR \
110 PONCA_FITTING_DECLARE_FINALIZE
112#define PONCA_FITTING_DECLARE_INIT_ADDDER_FINALIZE \
113 PONCA_FITTING_DECLARE_INIT \
114 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
115 PONCA_FITTING_DECLARE_FINALIZE
120 template <
typename T,
typename =
void>
125 template <
typename T>
This Source Code Form is subject to the terms of the Mozilla Public License, v.