Skip to main content
. 2022 Sep 24;24(10):1354. doi: 10.3390/e24101354
Algorithm2. Construction algorithm of sparse parent node graph.
Constructing Sparse Parent Node Graph Based on Edge Constraint
Input: V-set of all variables,C-set of constraints,score(.,.)-decomposable score function value
Output: SPG-Sparse parent node graph
1.  for X∈V do
2.    scoreX,parentsX←∅
3.      for layer←0 to n do
4.          for each node U Such that U∈V\X&U==layer do
5.             BestScoreX,U=maxY∈P,Y∉PaXBestScoreX,U\Y
6.               if U∩noPaX==∅&&scoreX,U>BestScoreX,U
7.            BestScoreX,U←scoreX,U
8.            Append [scoreX, parentsX] with BestScoreX,U,bitnarizeU
9.               end if
10.        end for
11.    end for
12.    Sort scoreX,parentsX with scoreX In descending
13. end for
14. return SPG ← [score., patrnts.]