Medusa  1.1
Coordinate Free Mehless Method implementation
FindClosest_fwd.hpp
Go to the documentation of this file.
1 #ifndef MEDUSA_BITS_DOMAINS_FINDCLOSEST_FWD_HPP_
2 #define MEDUSA_BITS_DOMAINS_FINDCLOSEST_FWD_HPP_
3 
11 #include <medusa/Config.hpp>
13 
14 namespace mm {
15 
23 class FindClosest {
24  private:
28  bool force_self_;
29 
30  public:
33  force_self_(false) {}
38  FindClosest& forNodes(indexes_t for_which) { for_which_ = std::move(for_which); return *this; }
44  search_among_ = std::move(search_among); return *this; }
46  FindClosest& forceSelf(bool b = true) { force_self_ = b; return *this; }
48  FindClosest& numClosest(int num) { support_size = num; return *this; }
49 
51  template <typename domain_t>
52  void operator()(domain_t& domain) const;
53 };
54 
55 } // namespace mm
56 
57 #endif // MEDUSA_BITS_DOMAINS_FINDCLOSEST_FWD_HPP_
mm
Root namespace for the whole library.
Definition: Gaussian.hpp:14
mm::FindClosest::numClosest
FindClosest & numClosest(int num)
Find num closest nodes. This methods overrides the value set in the constructor.
Definition: FindClosest_fwd.hpp:48
mm::FindClosest::operator()
void operator()(domain_t &domain) const
Find support for nodes in domain.
Definition: FindClosest.hpp:21
mm::FindClosest::searchAmong
FindClosest & searchAmong(indexes_t search_among)
Search only among given nodes.
Definition: FindClosest_fwd.hpp:43
mm::FindClosest::forNodes
FindClosest & forNodes(indexes_t for_which)
Find support only for these nodes.
Definition: FindClosest_fwd.hpp:38
Config.hpp
mm::FindClosest::support_size
int support_size
Support size.
Definition: FindClosest_fwd.hpp:25
mm::FindClosest
Class representing the engine for finding supports consisting of closest nodes.
Definition: FindClosest_fwd.hpp:23
mm::indexes_t
std::vector< int > indexes_t
Class representing a collection of indices.
Definition: Config.hpp:36
Range_fwd.hpp
mm::FindClosest::search_among_
Range< int > search_among_
Search only among these nodes.
Definition: FindClosest_fwd.hpp:27
mm::FindClosest::for_which_
Range< int > for_which_
Find support only for these nodes.
Definition: FindClosest_fwd.hpp:26
mm::FindClosest::FindClosest
FindClosest(int support_size)
Constructs an engine for finding support with given support size.
Definition: FindClosest_fwd.hpp:32
mm::FindClosest::force_self_
bool force_self_
Force each node as the first element of its support.
Definition: FindClosest_fwd.hpp:28
mm::FindClosest::forceSelf
FindClosest & forceSelf(bool b=true)
Put each node as the first of its support, even if it is not included in searchAmong().
Definition: FindClosest_fwd.hpp:46
mm::Range< int >