Class bintree¶
This class is used by Class hmatrix for space partitioning.
-
template<typename T>
class castor::bintree¶ Binary tree
bintree(X,N) is a recursive tree with a binary structure and bounding boxes. Each branch is divided into two new ones, with a median distribution of the M tri-dimensional nodes X, stored in a M-by-3 matrix. Leaves are reached when there are less than N nodes in a branch (default is N=100).
Public Functions
-
inline bintree()¶
-
bintree(matrix<T> const &X, std::size_t n = 100)¶
Constructor of binary tree. Nodes coordinates are stored in a M-by-3 matrix and maximum leaf size is fixed by n (default is 100).
-
matrix<T> leaf() const¶
.leaf() gives a vector of random values, same for each leaf. Usefull to visualize tree leaves.
-
inline bool const &isleaf() const¶
-
inline bbox const &box() const¶
-
inline bintree()¶