Medusa  1.1
Coordinate Free Mehless Method implementation
FindBalancedSupport_fwd.hpp
Go to the documentation of this file.
1 #ifndef MEDUSA_BITS_DOMAINS_FINDBALANCEDSUPPORT_FWD_HPP_
2 #define MEDUSA_BITS_DOMAINS_FINDBALANCEDSUPPORT_FWD_HPP_
3 
11 #include "Eigen/Core"
12 #include <medusa/Config.hpp>
14 
15 namespace mm {
16 
28  public:
33  bool force_self_;
34 
35  public:
37  FindBalancedSupport(int min_support, int max_support);
49  FindBalancedSupport& forceSelf(bool b = true);
54 
56  template <typename domain_t>
57  void operator()(domain_t& domain) const;
58 
60  template <typename domain_t, typename kdtree_t>
62  domain_t& domain, const kdtree_t& tree, int i, int min_support_size,
63  int max_support_size, const Range<int>& search_among, bool force_self);
64 
65  private:
67  template <class vec_t>
69  getFrame(const vec_t& normal);
70 
75  template <class vec_t>
76  static bool mark_quadrant(const vec_t& dx, typename vec_t::scalar_t tol,
77  std::vector<bool>& octants_covered,
78  const Eigen::Matrix<typename vec_t::scalar_t, vec_t::dim, -1>& basis);
79 };
80 
81 } // namespace mm
82 
83 #endif // MEDUSA_BITS_DOMAINS_FINDBALANCEDSUPPORT_FWD_HPP_
mm::FindBalancedSupport::balancedSupport
static Range< int > balancedSupport(domain_t &domain, const kdtree_t &tree, int i, int min_support_size, int max_support_size, const Range< int > &search_among, bool force_self)
Finds support for a given node i.
Definition: FindBalancedSupport.hpp:82
mm
Root namespace for the whole library.
Definition: Gaussian.hpp:14
mm::FindBalancedSupport::min_support_
int min_support_
Minimal support size.
Definition: FindBalancedSupport_fwd.hpp:29
scalar_t
Scalar scalar_t
Type of the elements, alias of Scalar.
Definition: MatrixBaseAddons.hpp:16
mm::FindBalancedSupport::getFrame
static Eigen::Matrix< typename vec_t::scalar_t, vec_t::dim, vec_t::dim-1 > getFrame(const vec_t &normal)
Gets orthonormal basis of vectors perpendicular to normal.
mm::FindBalancedSupport::forceSelf
FindBalancedSupport & forceSelf(bool b=true)
Put each node as the first of its support, even if it is not included in searchAmong().
Definition: FindBalancedSupport.cpp:24
dim
@ dim
Number of elements of this matrix.
Definition: MatrixBaseAddons.hpp:14
mm::FindBalancedSupport::search_among_
Range< int > search_among_
Search only among these nodes.
Definition: FindBalancedSupport_fwd.hpp:32
mm::FindBalancedSupport::operator()
void operator()(domain_t &domain) const
Find support for nodes in domain.
Definition: FindBalancedSupport.hpp:29
mm::FindBalancedSupport::mark_quadrant
static bool mark_quadrant(const vec_t &dx, typename vec_t::scalar_t tol, std::vector< bool > &octants_covered, const Eigen::Matrix< typename vec_t::scalar_t, vec_t::dim, -1 > &basis)
Marks a quadrant in which dx resides as occupied.
Definition: FindBalancedSupport.hpp:59
mm::FindBalancedSupport::minSupportSize
FindBalancedSupport & minSupportSize(int size)
Set minimum support size. This overrides the size set in constructor.
Definition: FindBalancedSupport.cpp:29
Config.hpp
mm::FindBalancedSupport::max_support_
int max_support_
Maximal support size.
Definition: FindBalancedSupport_fwd.hpp:30
mm::FindBalancedSupport::force_self_
bool force_self_
Force each node as the first element of its support.
Definition: FindBalancedSupport_fwd.hpp:33
mm::indexes_t
std::vector< int > indexes_t
Class representing a collection of indices.
Definition: Config.hpp:36
mm::FindBalancedSupport
Class representing the engine for finding directionally balanced supports.
Definition: FindBalancedSupport_fwd.hpp:27
Range_fwd.hpp
mm::FindBalancedSupport::maxSupportSize
FindBalancedSupport & maxSupportSize(int size)
Set maximal support size. This overrides the size set in constructor.
Definition: FindBalancedSupport.cpp:33
mm::FindBalancedSupport::searchAmong
FindBalancedSupport & searchAmong(indexes_t search_among)
Search only among given nodes.
Definition: FindBalancedSupport.cpp:19
mm::FindBalancedSupport::FindBalancedSupport
FindBalancedSupport(int min_support, int max_support)
Constructs an engine with given min and max support sizes.
Definition: FindBalancedSupport.cpp:10
Matrix
Matrix(const Scalar &s)
Construct matrix from scalar. Enabled only for fixed size matrices.
Definition: MatrixAddons.hpp:21
mm::FindBalancedSupport::forNodes
FindBalancedSupport & forNodes(indexes_t for_which)
Find support only for these nodes.
Definition: FindBalancedSupport.cpp:14
mm::Range< int >
mm::FindBalancedSupport::for_which_
Range< int > for_which_
Find support only for these nodes.
Definition: FindBalancedSupport_fwd.hpp:31