NVBIO
|
This module implements a class to hold a Sum Tree, an object similar to a Haar Wavelet tree, with the difference that each node encodes the plain sum of the children's coefficients. This data-structure allows O(log(N)) modifications to the values associated with the leaves of the tree.
Classes | |
struct | nvbio::SumTree< Iterator > |
Functions | |
template<typename Iterator > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 | nvbio::sample (const SumTree< Iterator > &tree, const float value) |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::sample | ( | const SumTree< Iterator > & | tree, |
const float | value | ||
) |
sample a cell from a linear SumTree, returning a leaf with probability proportional to its value in the SumTree
value | a value in the range [0,1] |
Definition at line 129 of file sum_tree_inl.h.