Grok 15.1.0
grk::TagTree< T > Class Template Reference

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

Detailed Description

template<typename T>
class grk::TagTree< T >

Tag tree.

Constructor & Destructor Documentation

◆ TagTree()

template<typename T>
grk::TagTree< T >::TagTree ( uint32_t leavesWidth,
uint32_t leavesHeight )
inline

Create a tag tree.

Parameters
leavesWidth_Width of the array of leaves of the tree
leavesHeight_Height of the array of leaves of the tree
Returns
a new tag tree if successful, returns nullptr otherwise

◆ ~TagTree()

template<typename T>
grk::TagTree< T >::~TagTree ( )
inline

Member Function Documentation

◆ compress()

template<typename T>
bool grk::TagTree< T >::compress ( BitIO * bio,
uint64_t leafno,
T threshold )
inline

Encode the value of a leaf of the tag tree up to a given threshold.

Parameters
bioBIO handle
leafnoleaf to compress
thresholdThreshold to use when compressing value of the leaf
Returns
true if successful, otherwise false

◆ decodeValue()

template<typename T>
void grk::TagTree< T >::decodeValue ( BitIO * bio,
uint64_t leafno,
T threshold,
T * value )
inline

Decompress the value of a leaf of the tag tree up to a given threshold.

Parameters
bioPointer to a BIO handle
leafnoNumber that identifies the leaf to decompress
thresholdThreshold to use when decoding value of the leaf
valuethe node's value

◆ getUninitializedValue()

template<typename T>
T grk::TagTree< T >::getUninitializedValue ( void )
inlineconstexpr

◆ reset()

template<typename T>
void grk::TagTree< T >::reset ( )
inline

Reset a tag tree (set all leaves to 0)

Referenced by grk::TagTree< uint8_t >::TagTree().

◆ setvalue()

template<typename T>
void grk::TagTree< T >::setvalue ( uint64_t leafno,
T value )
inline

Set the value of a leaf of a tag tree.

Parameters
leafnoleaf to modify
valuenew value of leaf

Member Data Documentation

◆ leavesHeight_

template<typename T>
uint32_t grk::TagTree< T >::leavesHeight_
private

◆ leavesWidth_

template<typename T>
uint32_t grk::TagTree< T >::leavesWidth_
private

◆ nodeCount

template<typename T>
uint64_t grk::TagTree< T >::nodeCount
private

◆ nodes

template<typename T>
TagTreeNode<T>* grk::TagTree< T >::nodes
private

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