Medusa  1.1
Coordinate Free Mehless Method implementation
mm::FindBalancedSupport Class Reference

#include <FindBalancedSupport_fwd.hpp>

Detailed Description

Class representing the engine for finding directionally balanced supports.

The support is directionally balanced, if it has nodes in all axis aligned hyper-quadrants centered around a node. It the node is a boundary node, then the same must be satisfied for half space, defined by the normal.

Usage example:

FindBalancedSupport find_support(min_ss, max_ss);
find_support.forNodes({0, 1, 2}).searchAmong({3, 4, 5, 6, 7, 8});
domain.findSupport(find_support);

Definition at line 27 of file FindBalancedSupport_fwd.hpp.

+ Collaboration diagram for mm::FindBalancedSupport:

Public Member Functions

 FindBalancedSupport (int min_support, int max_support)
 Constructs an engine with given min and max support sizes. More...
 
FindBalancedSupport & forNodes (indexes_t for_which)
 Find support only for these nodes. More...
 
FindBalancedSupport & searchAmong (indexes_t search_among)
 Search only among given nodes. More...
 
FindBalancedSupport & forceSelf (bool b=true)
 Put each node as the first of its support, even if it is not included in searchAmong(). More...
 
FindBalancedSupport & minSupportSize (int size)
 Set minimum support size. This overrides the size set in constructor. More...
 
FindBalancedSupport & maxSupportSize (int size)
 Set maximal support size. This overrides the size set in constructor. More...
 
template<typename domain_t >
void operator() (domain_t &domain) const
 Find support for nodes in domain. More...
 

Static Public Member Functions

template<typename domain_t , typename kdtree_t >
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. More...
 

Public Attributes

int min_support_
 Minimal support size. More...
 
int max_support_
 Maximal support size. More...
 
Range< int > for_which_
 Find support only for these nodes. More...
 
Range< int > search_among_
 Search only among these nodes. More...
 
bool force_self_
 Force each node as the first element of its support. More...
 

Static Private Member Functions

template<class vec_t >
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. More...
 
template<class vec_t >
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. More...
 

Constructor & Destructor Documentation

◆ FindBalancedSupport()

mm::FindBalancedSupport::FindBalancedSupport ( int  min_support,
int  max_support 
)

Constructs an engine with given min and max support sizes.

Definition at line 10 of file FindBalancedSupport.cpp.

Member Function Documentation

◆ balancedSupport()

template<typename domain_t , typename kdtree_t >
Range< int > mm::FindBalancedSupport::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 
)
static

Finds support for a given node i.

Definition at line 82 of file FindBalancedSupport.hpp.

◆ forceSelf()

FindBalancedSupport & mm::FindBalancedSupport::forceSelf ( bool  b = true)

Put each node as the first of its support, even if it is not included in searchAmong().

Definition at line 24 of file FindBalancedSupport.cpp.

◆ forNodes()

FindBalancedSupport & mm::FindBalancedSupport::forNodes ( indexes_t  for_which)

Find support only for these nodes.

If not given, finds support for all non-zero type domain nodes, as defined by domain.all().

Definition at line 14 of file FindBalancedSupport.cpp.

◆ getFrame()

template<class vec_t >
static Eigen::Matrix<typename vec_t::scalar_t, vec_t::dim, vec_t::dim-1> mm::FindBalancedSupport::getFrame ( const vec_t &  normal)
staticprivate

Gets orthonormal basis of vectors perpendicular to normal.

◆ mark_quadrant()

template<class vec_t >
bool mm::FindBalancedSupport::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 
)
staticprivate

Marks a quadrant in which dx resides as occupied.

Returns true if this quadrant is newly occupied and false otherwise.

Definition at line 59 of file FindBalancedSupport.hpp.

◆ maxSupportSize()

FindBalancedSupport & mm::FindBalancedSupport::maxSupportSize ( int  size)

Set maximal support size. This overrides the size set in constructor.

Definition at line 33 of file FindBalancedSupport.cpp.

◆ minSupportSize()

FindBalancedSupport & mm::FindBalancedSupport::minSupportSize ( int  size)

Set minimum support size. This overrides the size set in constructor.

Definition at line 29 of file FindBalancedSupport.cpp.

◆ operator()()

template<typename domain_t >
void mm::FindBalancedSupport::operator() ( domain_t &  domain) const

Find support for nodes in domain.

Definition at line 29 of file FindBalancedSupport.hpp.

◆ searchAmong()

FindBalancedSupport & mm::FindBalancedSupport::searchAmong ( indexes_t  search_among)

Search only among given nodes.

If not given, searches among all nodes, including zero-type nodes.

Definition at line 19 of file FindBalancedSupport.cpp.

Member Data Documentation

◆ for_which_

Range<int> mm::FindBalancedSupport::for_which_

Find support only for these nodes.

Definition at line 31 of file FindBalancedSupport_fwd.hpp.

◆ force_self_

bool mm::FindBalancedSupport::force_self_

Force each node as the first element of its support.

Definition at line 33 of file FindBalancedSupport_fwd.hpp.

◆ max_support_

int mm::FindBalancedSupport::max_support_

Maximal support size.

Definition at line 30 of file FindBalancedSupport_fwd.hpp.

◆ min_support_

int mm::FindBalancedSupport::min_support_

Minimal support size.

Definition at line 29 of file FindBalancedSupport_fwd.hpp.

◆ search_among_

Range<int> mm::FindBalancedSupport::search_among_

Search only among these nodes.

Definition at line 32 of file FindBalancedSupport_fwd.hpp.


The documentation for this class was generated from the following files:
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