Wavelet Toolbox    

Example 2: Building a Right Wavelet Tree Object (RWVTREE)

This example creates a new class of objects: RWVTREE.

We define a right wavelet tree class starting from the class WTREE and overloading the methods split, merge, and plot (inherited from DTREE).

The plot method shows how to add Node Labels.

You can have a look at a one-dimensional example in the ex1_rwvt M-file and at a two-dimensional example in the ex2_rwvt M-file located in the toolbox/wavelet/wavedemo directory. These programs can be used directly, but they are also useful to learn how to build new object-oriented programming functions.

The definition of the new class is described below.

Class RWVTREE (parent class: WTREE)

Fields

dummy
Not used
wtree
Parent object

Methods

rwvtree
Constructor for the class RWVTREE.
merge
Merge (recompose) the data of a node.
plot
Plot RWVTREE object.
split
Split (decompose) the data of a terminal node.

Running This Example

The following figure is obtained using the example ex1_rwvt and clicking the node 14.

The approximations are labeled in yellow and the details are labeled in red. The last nodes cannot be split.


  Example 1: Building a Wavelet Tree Object (WTREE) Example 3: Building a Wavelet Tree Object (WVTREE)