Skip to main content
. 2022 Apr 5;8:e880. doi: 10.7717/peerj-cs.880

Algorithm 3. Parallel UNWOUNDSUM.

1:  function PARALLEL_UNWOUNDSUM(m, pz, po, pi)
2:    l = len(m)
3:    sum = [] array of l zeroes
4:    for i1 to l + 1 in parallel, do
5:     next = shuffle(mi.w, l)
6:     for jl to 1 do
7:      wj = shuffle(mi.w, j)
8:      tmp = (next ⋅ (l − 1) + 1)/j
9:      sumi = sumi + tmppo
10:      next = wjtmp ⋅ (lj) ⋅ pz/l
11:      sumi = sumi + (1 − po) ⋅ wjl/((lj) ⋅ pz)
12:   return sum