|
Grok 12.0.1
|
Tag tree. More...
#include <TagTree.h>
Public Member Functions | |
| TagTree (uint32_t leavesWidth, uint32_t leavesHeight) | |
| Create a tag tree. | |
| ~TagTree () | |
| constexpr T | getUninitializedValue (void) |
| void | reset () |
| Reset a tag tree (set all leaves to 0) | |
| void | setvalue (uint64_t leafno, T value) |
| Set the value of a leaf of a tag tree. | |
| bool | compress (BitIO *bio, uint64_t leafno, T threshold) |
| Encode the value of a leaf of the tag tree up to a given threshold. | |
| 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. | |
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::Logger::error(), grk::grk_read(), grk::TagTree< T >::leavesHeight_, grk::TagTree< T >::leavesWidth_, grk::Logger::logger_, grk::TagTree< T >::nodeCount, grk::TagTree< T >::nodes, grk::TagTreeNode< T >::parent, grk::TagTree< T >::reset(), and grk::Logger::warn().
|
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::grk_read(), grk::TagTreeNode< T >::low, grk::TagTree< T >::nodes, and grk::TagTreeNode< T >::parent.
|
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::grk_read(), and grk::TagTree< T >::nodes.
|
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::grk_read(), 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::grk_read(), and 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 |