17#define BSKNF typename BasketType::NeighborFilter
18#define BSKP typename BasketType::DataPoint
20#ifndef PARSED_WITH_DOXYGEN
33 template <
class P,
class NF,
typename Aggregate,
template <
class,
class,
typename>
class Ext,
34 template <
class,
class,
typename>
class... Exts>
35 struct BasketAggregateImpl
37 using type =
typename BasketAggregateImpl<P, NF, Ext<P, NF, Aggregate>, Exts...>::type;
48 template <
class P,
class NF,
typename Aggregate,
template <
class,
class,
typename>
class Ext>
49 struct BasketAggregateImpl<P, NF, Aggregate, Ext>
51 using type = Ext<P, NF, Aggregate>;
62 template <
class P,
class NF,
template <
class,
class,
typename>
class... Exts>
63 struct BasketAggregate : BasketAggregateImpl<P, NF, PrimitiveBase<P, NF>, Exts...>
76 template <
int Type,
typename BasketType,
template <
class,
class,
int,
typename>
class Ext,
77 template <
class,
class,
int,
typename>
class... Exts>
78 struct BasketDiffAggregateImpl
80 using type =
typename BasketDiffAggregateImpl<Type, Ext<BSKP, BSKNF, Type, BasketType>, Exts...>::type;
90 template <
int Type,
typename BasketType,
template <
class,
class,
int,
typename>
class Ext>
91 struct BasketDiffAggregateImpl<Type, BasketType, Ext>
93 using type = Ext<BSKP, BSKNF, Type, BasketType>;
104 template <
typename BasketType,
int Type,
template <
class,
class,
int,
typename>
class... Exts>
105 struct BasketDiffAggregate : BasketDiffAggregateImpl<Type, BasketType, PrimitiveDer, Exts...>
132 template <
typename _Derived,
typename _Base>
152 template <
typename IteratorBegin,
typename IteratorEnd>
161 for (
auto it = begin;
it != end; ++
it)
165 res = Base::finalize();
178 template <
typename IndexRange,
typename Po
intContainer>
187 for (
const auto&
i :
ids)
191 res = Base::finalize();
198#define WRITE_COMPUTE_FUNCTIONS \
199 using BasketComputeObject<Self, Base>::compute; \
200 using BasketComputeObject<Self, Base>::computeWithIds;
210 template <
typename BasketType,
int Type,
template <
class,
class,
int,
typename>
class Ext0,
211 template <
class,
class,
int,
typename>
class... Exts>
214 typename internal::BasketDiffAggregate<BasketType, Type, Ext0, Exts...>::type>
226 using Scalar =
typename BasketType::Scalar;
227 WRITE_COMPUTE_FUNCTIONS
234 typename Base::ScalarArray
dw;
253 template <
class P,
class NF,
template <
class,
class,
typename>
class Ext0,
254 template <
class,
class,
typename>
class... Exts>
256 typename internal::BasketAggregate<P, NF, Ext0, Exts...>::type>
266 using VectorType =
typename P::VectorType;
272 WRITE_COMPUTE_FUNCTIONS
294#undef WRITE_COMPUTE_FUNCTIONS
Aggregator class used to declare specialized structures with derivatives computations,...
typename BasketType::DataPoint DataPoint
Point type used for computation.
bool addNeighbor(const DataPoint &_nei)
Add a neighbor to perform the fit.
typename BasketType::NeighborFilter NeighborFilter
Neighbor Filter.
typename BasketType::Scalar Scalar
Scalar type used for computation, as defined from Basket.
Aggregator class used to declare specialized structures using CRTP.
typename internal::BasketAggregate< P, NF, Ext0, Exts... >::type Base
Base type, which aggregates all the computational objects using the CRTP.
typename P::Scalar Scalar
Scalar type used for computation, as defined from template parameter P
bool addNeighbor(const DataPoint &_nei)
Add a neighbor to perform the fit.
This Source Code Form is subject to the terms of the Mozilla Public License, v.
FIT_RESULT
Enum corresponding to the state of a fitting method (and what the finalize function returns)
@ UNDEFINED
The fitting is undefined, you can't use it for valid results.
@ NEED_OTHER_PASS
The fitting procedure needs to analyse the neighborhood another time.
Base ComputeObject for the Basket classes.
FIT_RESULT computeWithIds(IndexRange ids, const PointContainer &points)
Convenience function to iterate over a subset of samples in a PointContainer Add neighbors stored in ...
FIT_RESULT compute(const IteratorBegin &begin, const IteratorEnd &end)
Convenience function for STL-like iterators Add neighbors stored in a container using STL-like iterat...
typename Base::Scalar Scalar
Alias to the Derived type.
ComputeObject is a virtual object that represents an algorithm which can be used with the compute fun...
_Derived & derived()
Retrieve the top layer object Returns a reference to the derived class so that we can use its overwri...