MOAB: Mesh Oriented datABase  (version 5.3.1)
moab::OrientedBoxTreeTool::Settings Struct Reference

Misc. knobs controlling tree subdivision. More...

#include <OrientedBoxTreeTool.hpp>

## Public Member Functions

Settings ()
set defaults
bool valid () const
Check if settings are valid.

## Public Attributes

int max_leaf_entities
Average number of entities per leaf.
int max_depth
double worst_split_ratio
double best_split_ratio
unsigned int set_options
Flags used to create entity sets representing tree nodes.

## Detailed Description

Misc. knobs controlling tree subdivision.

Available settings for controlling when and how nodes in the tree are split. The constructor will initialize to the default settings. All settings except best_split_ratio control when a node is subdivided. best_split_ratio influences the choice of how the node is subdivided.

A calculated ratio is used in the determination of when and how to split a node. The ratio is calculated as:

• $$max(\frac{|n_L - n_R|}{n_L+n_R}, f*\frac{n_I}{n_L+n_R})$$
• $$n_L$$ : num entities to be placed in left child
• $$n_R$$ : num entities to be placed in right child
• $$f$$ : Settings::intersect_ratio_factor
• $$n_I$$: num entities intersecting split plane

ALL of the following conditions must be met for a node to be further subdivied:

• Depth must be less than max_depth
• Node must contain more than max_leaf_entities entities.
• The 'ratio' must be less than worst_split_ratio

The node will be subdivided using a plane normal to one of the box axis and containing the box center. The planes are tested beginning with the one orthogonal to the longest box axis and finishing with the one orthogonal to the shortest box axis. The search will stop at the first plane for which the 'ratio' is at least Settings::best_split_ratio . Giving Settings::best_split_ratio a non-zero value gives preference to a split orthogonal to larger box dimensions.

Definition at line 88 of file OrientedBoxTreeTool.hpp.

## Constructor & Destructor Documentation

 moab::OrientedBoxTreeTool::Settings::Settings ( )

set defaults

Definition at line 72 of file OrientedBoxTreeTool.cpp.

    : max_leaf_entities( 8 ), max_depth( 0 ), worst_split_ratio( 0.95 ), best_split_ratio( 0.4 ),
set_options( MESHSET_SET )
{
}


## Member Function Documentation

 bool moab::OrientedBoxTreeTool::Settings::valid ( ) const

Check if settings are valid.

Definition at line 78 of file OrientedBoxTreeTool.cpp.

References max_depth.

Referenced by moab::OrientedBoxTreeTool::build(), moab::OrientedBoxTreeTool::join_trees(), and main().

{
return max_leaf_entities > 0 && max_depth >= 0 && worst_split_ratio <= 1.0 && best_split_ratio >= 0.0 &&
worst_split_ratio >= best_split_ratio;
}


## Member Data Documentation

Must be in [0.0,worst_split_ratio] The search for an optimal split plane for splitting a node will stop if at least this ratio is achieved for the number of entities on each side of the split plane.

Definition at line 102 of file OrientedBoxTreeTool.hpp.

Referenced by moab::OrientedBoxTreeTool::build_tree(), main(), and usage().

Maximum tree depth - 0->no limit

Definition at line 93 of file OrientedBoxTreeTool.hpp.

Referenced by moab::OrientedBoxTreeTool::build_tree(), main(), usage(), and TreeValidator::visit().

Average number of entities per leaf.

Definition at line 92 of file OrientedBoxTreeTool.hpp.

Referenced by moab::OrientedBoxTreeTool::build_tree(), main(), usage(), and TreeValidator::visit().

 unsigned int moab::OrientedBoxTreeTool::Settings::set_options

Flags used to create entity sets representing tree nodes.

Definition at line 104 of file OrientedBoxTreeTool.hpp.

Must be in [best_split_ratio,1.0] A tree node will not be split if the ratio of children in the child nodes is greater than this value.

Definition at line 97 of file OrientedBoxTreeTool.hpp.

Referenced by moab::OrientedBoxTreeTool::build_tree(), main(), and usage().

List of all members.

The documentation for this struct was generated from the following files: