Algorithm 2. Parallel EXTEND.
1: function PARALLEL_EXTEND(m, pz, po, pi) |
2: l = len(m) |
3: ml+1.(d, z, o, w) = (pi, pz, po, l = 0 ? 1 : 0) |
4: for to l + 1 in parallel, do |
5: left_w = shuffle(mi.w, i − 1) |
6: mi.w = mi.w ⋅ pz ⋅ (l + 1 − i)/(l + 1) |
7: mi.w = mi.w + po ⋅ left_w ⋅ i/(l + 1) |
8: return m |