|
Algorithm 3: Encoding a value with subroutines and
|
-
Input:
Value to be encoded , vector size D
-
Ensure:
and
-
Output:
Array of vectors
-
1:
{Number of vectors}
-
2:
{Highest power of 2}
-
3:
{Current vector}
-
4:
whiledo {}
-
5:
if
then
-
6:
-
7:
-
8:
-
9:
-
10:
else if
then
-
11:
-
12:
-
13:
-
14:
else
-
15:
-
16:
end if
-
17:
end while
-
18:
return
|