Research Article

A Hybrid Vector Quantization Combining a Tree Structure and a Voronoi Diagram

Pseudocode 2

Input: an input vector x, a root node of tree structure root, and a set of Voronoi regions V
Output: an optimal codeword
Greedy search algorithm:
(1) Project x to , and denote the projected vector as
(2) Call = to find a Voronoi region
(3) Call = to find an optimal codeword with a
predefined number of ripples, , and set the minimal distance is as infinite
(4) Return
Function
(5) If then {
(6)   If then
(7)    Return a Voronoi region
(8)   Else
(9)    Call ,
(10) }
(11) Else {
(12)   If then
(13)    Return a Voronoi region
(14)   Else
(15)    Call ,
(16) }
Function , , ,
(17) If > 1 then {
(18)  Find a such that is minimized
(19)  Let be the neighbors in group of Voronoi region
(20) Find a such that the distance, , between and the codeword of is minimized
(21)  If then {
(22)    , , ,
(23)   Return
(24)  }
(25) }
(26) Return