Ponca  4a9354998d048bf882a3ee9bac8105216fa08d13
Point Cloud Analysis library
Loading...
Searching...
No Matches
mean.hpp
1/*
2 Copyright (C) 2014 Nicolas Mellado <nmellado0@gmail.com>
3 Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>
4
5 This Source Code Form is subject to the terms of the Mozilla Public
6 License, v. 2.0. If a copy of the MPL was not distributed with this
7 file, You can obtain one at http://mozilla.org/MPL/2.0/.
8*/
9
10template <class DataPoint, class _NFilter, typename T>
12{
13 Base::init();
14 m_sumP = VectorType::Zero();
15}
16
17template <class DataPoint, class _NFilter, typename T>
19 const DataPoint& attributes)
20{
21 Base::addLocalNeighbor(w, localQ, attributes);
22 m_sumP += w * localQ;
23}
24
25template <class DataPoint, class _NFilter, typename T>
27{
28 Base::init();
29 m_sumN = VectorType::Zero();
30}
31
32template <class DataPoint, class _NFilter, typename T>
34 const DataPoint& attributes)
35{
36 Base::addLocalNeighbor(w, localQ, attributes);
37 m_sumN += w * attributes.normal();
38}
39
40template <class DataPoint, class _NFilter, int DiffType, typename T>
41 requires MEAN_POSITION_DER_REQUIREMENTS
43{
44 Base::init();
45 m_dSumP.setZero();
46}
47
48template <class DataPoint, class _NFilter, int DiffType, typename T>
49 requires MEAN_POSITION_DER_REQUIREMENTS
51 const DataPoint& attributes, ScalarArray& dw)
52{
53 Base::addLocalNeighbor(w, localQ, attributes, dw);
54 m_dSumP += localQ * dw;
55}
56
57template <class DataPoint, class _NFilter, int DiffType, typename T>
58 requires MEAN_NORMAL_DER_REQUIREMENTS
60{
61 Base::init();
62 m_dSumN.setZero();
63}
64
65template <class DataPoint, class _NFilter, int DiffType, typename T>
66 requires MEAN_NORMAL_DER_REQUIREMENTS
68 const DataPoint& attributes, ScalarArray& dw)
69{
70 Base::addLocalNeighbor(w, localQ, attributes, dw);
71 m_dSumN += attributes.normal() * dw;
72}
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
Definition mean.h:184
typename Base::VectorType VectorType
Alias to vector type.
Definition mean.h:183
void addLocalNeighbor(Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw)
Add a neighbor to perform the fit.
Definition mean.hpp:67
typename DataPoint::Scalar Scalar
Alias to scalar type.
Definition mean.h:183
void init()
Set the evaluation position and reset the internal states.
Definition mean.hpp:59
void init()
Set the evaluation position and reset the internal states.
Definition mean.hpp:26
typename Base::VectorType VectorType
Alias to vector type.
Definition mean.h:83
void addLocalNeighbor(Scalar w, const VectorType &localQ, const DataPoint &attributes)
Add a neighbor to perform the fit.
Definition mean.hpp:33
typename DataPoint::Scalar Scalar
Alias to scalar type.
Definition mean.h:83
typename Base::VectorType VectorType
Alias to vector type.
Definition mean.h:122
typename DataPoint::Scalar Scalar
Alias to scalar type.
Definition mean.h:122
void init()
Set the evaluation position and reset the internal states.
Definition mean.hpp:42
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
Definition mean.h:123
void addLocalNeighbor(Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw)
Add a neighbor to perform the fit.
Definition mean.hpp:50
Aggregator class used to declare specialized structures using CRTP.
Definition basket.h:294
Compute the barycenter of the input points.
Definition mean.h:28
typename DataPoint::Scalar Scalar
Alias to scalar type.
Definition mean.h:29
typename Base::VectorType VectorType
Alias to vector type.
Definition mean.h:29