Skip to main content
. 2022 Sep 24;24(10):1354. doi: 10.3390/e24101354
Algorithm 5. Query algorithm of best parent node set.
The Best Parent Node Set Based on the Path Constraint Query
Input: V-set of all variables, C set of path constraints, SPG-sparse parent node graph
Output: bestsparents.,.-the best parent node set, bestsCore.,.-the corresponding score
1.valid←allScoresX
2. for each do
3.     valid←valid&~parentsXYi
4. end for
5. for each Yj such that Yj⇒X∈C do
6.         Cvalid←allScoresX
7.         for each S Holding that Yj⇒S in G do
8.           Cvalid←Cvalid|parentsXS
9.           Cvalid←Cvalid|parentsXYi
10.     end for
11.     valid←valid&Cvalid
12. end for
13. for each Yk such that Yk⇒X∈C do
14.         for each S Holding that Yk⇒S in G do
15.            valid←valid&~parentsXS
16.         end for
17. end for
18. index←firstSetBitvalid
19. return scroresXindex