Medusa  1.1
Coordinate Free Mehless Method implementation
PUApproximant_fwd.hpp
Go to the documentation of this file.
1 #ifndef MEDUSA_BITS_INTERPOLANTS_PUAPPROXIMANT_FWD_HPP_
2 #define MEDUSA_BITS_INTERPOLANTS_PUAPPROXIMANT_FWD_HPP_
3 
11 #include <Eigen/Core>
14 
15 namespace mm {
16 
39 template <typename vec_t>
41  template <typename scalar_t>
42  using eigen_vt = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
43  using d_scalar_t = typename vec_t::scalar_t;
44 
45  public:
56  static typename vec_t::scalar_t weight(typename vec_t::scalar_t r) {
57  assert_msg(r >= 0 && r <= 1,
58  "Effective radius must be larger than 0 and smaller than 1, got %g", r);
59  return ipow<3>(1 - r) * (6 * r * r + 3 * r + 1);
60  }
61 
86  template <typename scalar_t, typename engine_t>
87  static eigen_vt<scalar_t> evaluate(const DomainDiscretization<vec_t>& domain,
88  const eigen_vt<scalar_t>& values,
89  const Range<vec_t>& query_points, d_scalar_t radius_factor,
90  const engine_t& engine);
91 
93  template <typename scalar_t, typename engine_t>
94  static eigen_vt<scalar_t> evaluate(const DomainDiscretization<vec_t>& domain,
95  const eigen_vt<scalar_t>& values,
96  const KDTree<vec_t>& query_points_tree,
97  d_scalar_t radius_factor, const engine_t& engine);
98 };
99 
100 } // namespace mm
101 
102 #endif // MEDUSA_BITS_INTERPOLANTS_PUAPPROXIMANT_FWD_HPP_
mm
Root namespace for the whole library.
Definition: Gaussian.hpp:14
scalar_t
Scalar scalar_t
Type of the elements, alias of Scalar.
Definition: MatrixBaseAddons.hpp:16
mm::DomainDiscretization
Class representing domain discretization along with an associated shape.
Definition: DomainDiscretization_fwd.hpp:46
mm::KDTree
Class representing a static k-d tree data structure.
Definition: KDTree_fwd.hpp:36
mm::PUApproximant::evaluate
static eigen_vt< scalar_t > evaluate(const DomainDiscretization< vec_t > &domain, const eigen_vt< scalar_t > &values, const Range< vec_t > &query_points, d_scalar_t radius_factor, const engine_t &engine)
Evaluates the Partion-of-unity approximant at points 'query_points' constructed on given pairs.
mm::PUApproximant::eigen_vt
Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > eigen_vt
Vector type.
Definition: PUApproximant_fwd.hpp:42
assert_msg
#define assert_msg(cond,...)
Assert with better error reporting.
Definition: assert.hpp:75
mm::PUApproximant::d_scalar_t
typename vec_t::scalar_t d_scalar_t
Scalar type.
Definition: PUApproximant_fwd.hpp:43
Range_fwd.hpp
DomainDiscretization_fwd.hpp
mm::PUApproximant::weight
static vec_t::scalar_t weight(typename vec_t::scalar_t r)
Computes smooth weights .
Definition: PUApproximant_fwd.hpp:56
mm::Range< vec_t >
mm::PUApproximant
An efficient partition-of-unity based approximation method for gluing the local approximations togeth...
Definition: PUApproximant_fwd.hpp:40