|
Grok 10.0.5
|
Tag tree. More...
#include <TagTree.h>
Public Member Functions | |
| TagTree (uint32_t leavesWidth, uint32_t leavesHeight) | |
| Create a tag tree. More... | |
| ~TagTree () | |
| constexpr T | getUninitializedValue (void) |
| void | reset () |
| Reset a tag tree (set all leaves to 0) More... | |
| void | setvalue (uint64_t leafno, T value) |
| Set the value of a leaf of a tag tree. More... | |
| bool | compress (BitIO *bio, uint64_t leafno, T threshold) |
| Encode the value of a leaf of the tag tree up to a given threshold. More... | |
| void | decodeValue (BitIO *bio, uint64_t leafno, T threshold, T *value) |
| Decompress the value of a leaf of the tag tree up to a given threshold. More... | |
Private Attributes | |
| uint32_t | leavesWidth_ |
| uint32_t | leavesHeight_ |
| uint64_t | nodeCount |
| TagTreeNode< T > * | nodes |
Tag tree.
|
inline |
Create a tag tree.
| leavesWidth_ | Width of the array of leaves of the tree |
| leavesHeight_ | Height of the array of leaves of the tree |
References grk::GRK_ERROR(), grk::GRK_WARN(), grk::TagTree< T >::leavesHeight_, grk::TagTree< T >::leavesWidth_, grk::TagTree< T >::nodeCount, grk::TagTree< T >::nodes, and grk::TagTree< T >::reset().
|
inline |
References grk::TagTree< T >::nodes.
|
inline |
Encode the value of a leaf of the tag tree up to a given threshold.
| bio | BIO handle |
| leafno | leaf to compress |
| threshold | Threshold to use when compressing value of the leaf |
References grk::TagTree< T >::nodes, and grk::BitIO::write().
|
inline |
Decompress the value of a leaf of the tag tree up to a given threshold.
| bio | Pointer to a BIO handle |
| leafno | Number that identifies the leaf to decompress |
| threshold | Threshold to use when decoding value of the leaf |
| value | the node's value |
References grk::TagTree< T >::getUninitializedValue(), grk::TagTree< T >::nodes, and grk::BitIO::read().
|
inlineconstexpr |
Referenced by grk::TagTree< T >::decodeValue(), and grk::TagTree< T >::reset().
|
inline |
Reset a tag tree (set all leaves to 0)
References grk::TagTree< T >::getUninitializedValue(), grk::TagTree< T >::nodeCount, and grk::TagTree< T >::nodes.
Referenced by grk::TagTree< T >::TagTree().
|
inline |
Set the value of a leaf of a tag tree.
| leafno | leaf to modify |
| value | new value of leaf |
References grk::TagTree< T >::nodes.
|
private |
Referenced by grk::TagTree< T >::TagTree().
|
private |
Referenced by grk::TagTree< T >::TagTree().
|
private |
Referenced by grk::TagTree< T >::reset(), and grk::TagTree< T >::TagTree().
|
private |