panwave
All Classes Functions
Public Member Functions | Protected Member Functions | List of all members
panwave::StationaryWaveletPacketTree Class Reference

#include <StationaryWaveletPacketTree.h>

Inheritance diagram for panwave::StationaryWaveletPacketTree:
Inheritance graph
[legend]
Collaboration diagram for panwave::StationaryWaveletPacketTree:
Collaboration graph
[legend]

Public Member Functions

 StationaryWaveletPacketTree (size_t height, const Wavelet *wavelet, PaddingMode padding_mode=PaddingMode::Zeroes)
 
void Decompose () override
 
void Reconstruct (size_t level) override
 
- Public Member Functions inherited from panwave::WaveletPacketTreeTemplateBase< 4 >
 WaveletPacketTreeTemplateBase (size_t height, const Wavelet *wavelet)
 
void SetRootSignal (const std::vector< double > *signal) override
 
const std::vector< double > * GetRootSignal () override
 
size_t GetWaveletLevelCount () const override
 
- Public Member Functions inherited from panwave::Tree< WaveletPacketTreeBase::WaveletPacketTreeNodeData, k >
 Tree (size_t height)
 
- Public Member Functions inherited from panwave::WaveletPacketTreeBase
 WaveletPacketTreeBase (const WaveletPacketTreeBase &)=delete
 
 WaveletPacketTreeBase (const WaveletPacketTreeBase &&)=delete
 
WaveletPacketTreeBaseoperator= (const WaveletPacketTreeBase &)=delete
 
WaveletPacketTreeBaseoperator= (const WaveletPacketTreeBase &&)=delete
 
virtual size_t GetWaveletLevelCount () const =0
 

Protected Member Functions

void DecomposeNode (size_t node)
 
void ReconstructNode (size_t node)
 
void ReconstructAccumulate (size_t leaf_node, std::vector< double > *accumulated_signal)
 
- Protected Member Functions inherited from panwave::Tree< WaveletPacketTreeBase::WaveletPacketTreeNodeData, k >
size_t GetLeafCount () const
 
size_t GetFirstLeaf () const
 
size_t GetLastLeaf () const
 
bool IsLeaf (size_t node) const
 
size_t GetChild (size_t parent, size_t child_index) const
 
size_t GetParent (size_t child) const
 
WaveletPacketTreeBase::WaveletPacketTreeNodeDataGetNodeData (size_t index)
 
bool IsMarked (size_t node) const
 
void SetMark (size_t node)
 
void Unmark ()
 
size_t GetHeight () const
 

Additional Inherited Members

- Protected Attributes inherited from panwave::WaveletPacketTreeTemplateBase< 4 >
const Waveletwavelet_
 

Detailed Description

A wavelet packet tree which tries to keep the reconstructed signals stationary in time. This has the effect of producing smoother reconstructed signals compared to a conventional wavelet packet tree decomposition.
This is implemented as a quad tree where the signal of each node is decomposed into four children signals. The four signals produced are the details and approximate coefficients downsampled dyadically in both even and odd dyadic modes.

See also
WaveletPacketTree

Constructor & Destructor Documentation

◆ StationaryWaveletPacketTree()

panwave::StationaryWaveletPacketTree::StationaryWaveletPacketTree ( size_t  height,
const Wavelet wavelet,
PaddingMode  padding_mode = PaddingMode::Zeroes 
)

Construct a StationaryWaveletPacketTree instance.
Root signal is initially unset. Set it before calling Decompose.

Parameters
heightHeight of the tree. A tree with only one root node has height of 1.
waveletWavelet object used during decomposition / reconstruction.
padding_modeHow we should pad the signal data during decomposition / reconstruction. (default: Zeroes)
See also
Wavelet
Decompose
Reconstruct

Member Function Documentation

◆ Decompose()

void panwave::StationaryWaveletPacketTree::Decompose ( )
overridevirtual

Perform a wavelet packet tree decomposition.
Starting with the root node, decomposes recursively every node in the tree stopping at the leaf nodes.
This is not a sparse decomposition, all nodes will have decomposed signal data after executing.

See also
SetRootSignal

Implements panwave::WaveletPacketTreeBase.

◆ Reconstruct()

void panwave::StationaryWaveletPacketTree::Reconstruct ( size_t  level)
overridevirtual

Reconstruct an isolated wavelet level.
Beginning at the leaf nodes, recursively reconstruct up all levels of the tree stopping at the root node.
Upon completion, the root signal will contain the reconstructed signal.

Parameters
levelThe wavelet level we should isolate and reconstruct.
See also
GetRootSignal

Implements panwave::WaveletPacketTreeBase.

◆ ReconstructAccumulate()

void panwave::StationaryWaveletPacketTree::ReconstructAccumulate ( size_t  leaf_node,
std::vector< double > *  accumulated_signal 
)
protected

Isolates one leaf and reconstructs the root signal. The root signal is accumulated into accumulated_signal.

Parameters
leaf_nodeThe leaf node we want to isolate.
accumulated_signalVector in which we will add the root signal after isolating the leaf and reconstructing the signal.

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