Skip to main content
. 2021 Oct 31;21(21):7254. doi: 10.3390/s21217254
Algorithm 1: The KMST tree-filtering algorithm, TF_KMST
Input: An uncertain graph G, an integer k, a weight threshold ω.
Output: top-k RSTs.

1: Q←⌀;ρ←0;T←Prim(G)

2: while W(T)<ω do

3:    T←GenNext()

4:    ρ←Q.min().probability()

5:    if Q.size()<k then

6:        Q.insert(T)

7:    else if P(T)>ρ then

8:         Q.remove_min();Q.insert(T)

9:    end if

10: end while

11: return Q.all()