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_MULTIPASS_TYPES \
61 using Base = MultipassStatus<DataPoint, _NFilter, T>; \
62 using Status = Base; \
64 using Scalar = typename DataPoint::Scalar; \
65 using VectorType = typename Base::VectorType; \
66 using NeighborFilter = typename Base::NeighborFilter;
69#define PONCA_FITTING_DECLARE_MATRIX_TYPE \
71 using MatrixType = typename DataPoint::MatrixType;
74#define PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES \
76 using ScalarArray = typename Base::ScalarArray; \
77 using VectorArray = typename Base::VectorArray;
80#define PONCA_FITTING_APIDOC_SETWFUNC \
83#define PONCA_FITTING_APIDOC_INIT \
86#define PONCA_FITTING_APIDOC_ADDNEIGHBOR
87#define PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER
88#define PONCA_FITTING_APIDOC_FINALIZE \
94#define PONCA_FITTING_IS_SIGNED(IS_SIGNED) \
96 PONCA_MULTIARCH inline constexpr bool isSigned() { return IS_SIGNED; }
99#define PONCA_FITTING_DECLARE_INIT \
100 PONCA_FITTING_APIDOC_INIT \
101 PONCA_MULTIARCH inline void init();
104#define PONCA_FITTING_DECLARE_ADDNEIGHBOR \
105 PONCA_FITTING_APIDOC_ADDNEIGHBOR \
106 PONCA_MULTIARCH inline void addLocalNeighbor(Scalar w, const VectorType& localQ, const DataPoint& attributes);
109#define PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
110 PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER \
111 PONCA_MULTIARCH inline void addLocalNeighbor(Scalar w, const VectorType& localQ, const DataPoint& attributes, \
115#define PONCA_FITTING_DECLARE_FINALIZE \
116 PONCA_FITTING_APIDOC_FINALIZE \
117 PONCA_MULTIARCH inline FIT_RESULT finalize();
119#define PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE \
120 PONCA_FITTING_DECLARE_INIT \
121 PONCA_FITTING_DECLARE_ADDNEIGHBOR \
122 PONCA_FITTING_DECLARE_FINALIZE
124#define PONCA_FITTING_DECLARE_INIT_ADDDER_FINALIZE \
125 PONCA_FITTING_DECLARE_INIT \
126 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
127 PONCA_FITTING_DECLARE_FINALIZE
132 template <
typename T,
typename =
void>
133 struct hasFirstFundamentalForm : std::false_type
137 template <
typename T>
Aggregator class used to declare specialized structures using CRTP.
This Source Code Form is subject to the terms of the Mozilla Public License, v.