Flow123d  release_2.2.0-914-gf1a3a4f
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
BIHNode Class Reference

#include <bih_node.hh>

Public Member Functions

void set_leaf (unsigned int begin, unsigned int end, double bound, unsigned int depth)
 
void set_non_leaf (unsigned int left, unsigned int right, unsigned int axis)
 
bool is_leaf () const
 return true if node is leaf More...
 
unsigned char depth () const
 return depth of leaf node More...
 
unsigned int leaf_begin () const
 
unsigned int leaf_end () const
 
unsigned int leaf_size () const
 
unsigned int axis () const
 return axes (coordination of splitting) of inner node More...
 
double bound () const
 
unsigned int child (unsigned int i_child) const
 Return index of child node. More...
 

Static Public Attributes

static const unsigned int child_count = 2
 count of subareas - don't change More...
 
static const unsigned char dimension = 3
 count of dimensions More...
 

Private Member Functions

void set_depth (unsigned int depth)
 

Private Attributes

unsigned int child_ [child_count]
 child nodes indexes More...
 
double bound_
 
unsigned char axis_
 

Detailed Description

Definition at line 26 of file bih_node.hh.

Member Function Documentation

unsigned int BIHNode::axis ( ) const
inline

return axes (coordination of splitting) of inner node

Definition at line 91 of file bih_node.hh.

Here is the caller graph for this function:

double BIHNode::bound ( ) const
inline

Definition at line 97 of file bih_node.hh.

Here is the caller graph for this function:

unsigned int BIHNode::child ( unsigned int  i_child) const
inline

Return index of child node.

Definition at line 103 of file bih_node.hh.

Here is the caller graph for this function:

unsigned char BIHNode::depth ( ) const
inline

return depth of leaf node

Definition at line 61 of file bih_node.hh.

Here is the caller graph for this function:

bool BIHNode::is_leaf ( ) const
inline

return true if node is leaf

Definition at line 56 of file bih_node.hh.

Here is the caller graph for this function:

unsigned int BIHNode::leaf_begin ( ) const
inline

Definition at line 67 of file bih_node.hh.

Here is the caller graph for this function:

unsigned int BIHNode::leaf_end ( ) const
inline

Definition at line 73 of file bih_node.hh.

Here is the caller graph for this function:

unsigned int BIHNode::leaf_size ( ) const
inline

Get count of elements stored in

Returns
Count of elements contained in node

Definition at line 84 of file bih_node.hh.

Here is the caller graph for this function:

void BIHNode::set_depth ( unsigned int  depth)
inlineprivate

Set depth of node to axes_ class members

Parameters
depthDepth of node in tree.

Definition at line 118 of file bih_node.hh.

void BIHNode::set_leaf ( unsigned int  begin,
unsigned int  end,
double  bound,
unsigned int  depth 
)
inline

Set leaf node.

Definition at line 37 of file bih_node.hh.

void BIHNode::set_non_leaf ( unsigned int  left,
unsigned int  right,
unsigned int  axis 
)
inline

Set non-leaf node.

Definition at line 47 of file bih_node.hh.

Member Data Documentation

unsigned char BIHNode::axis_
private

Value stores coordination of splitting area for inner nodes or depth for leaf nodes

  • values 0,1,2 indicate inner node of tree and coordination of splitting area
  • values 3 and greater indicate leaf node of tree and store depth of node (depth = axes_ - 3)

Definition at line 137 of file bih_node.hh.

double BIHNode::bound_
private

A non-leaf node has two childs (left and right). Their bounding boxes are created from the bounding box of parent so that in one direction the left child set max to its bound_ and the right child set its min to bound_. This way we can always repcreate bounding box of every node when traversing the tree from the root.

Definition at line 130 of file bih_node.hh.

unsigned int BIHNode::child_[child_count]
private

child nodes indexes

Definition at line 123 of file bih_node.hh.

const unsigned int BIHNode::child_count = 2
static

count of subareas - don't change

Definition at line 30 of file bih_node.hh.

const unsigned char BIHNode::dimension = 3
static

count of dimensions

Definition at line 32 of file bih_node.hh.


The documentation for this class was generated from the following file: