Skip to main content
. 2021 Oct 31;21(21):7254. doi: 10.3390/s21217254
Algorithm 3: The Edge Filtering Algorithm On The Fly, EF_OTF
Input: An uncertain graph G, an integer k, a weight threshold ω.
Output: top-k RSTs.

1: Q←⌀;ρ←0;sort(E);C←X.Initialize()

2: while Cisnotthelastcombination do

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

4:    if P(C)>ρ then

5:        if W(C)<ω and isTree(C) then

6:           PMST(TC)←caculate_MST_Probability(TC)

7:           if Q.size()<k then

8:               Q.insert(TC)

9:           else if PMST>ρ then

10:               Q.remove_min();Q.insert(TC)

11:           end if

12:        end if

13:        C←nextcombination

14:    else

15:        C←firstcombinationofnextgroup

16:    end if

17: end while

18: return Q.all()