WIP
This commit is contained in:
@@ -5,6 +5,8 @@ import MetagraphOptimization.insert_edge!
|
||||
import MetagraphOptimization.make_node
|
||||
import MetagraphOptimization.siblings
|
||||
import MetagraphOptimization.partners
|
||||
import MetagraphOptimization.is_dependent
|
||||
import MetagraphOptimization.pairwise_independent
|
||||
|
||||
graph = MetagraphOptimization.DAG()
|
||||
|
||||
@@ -108,6 +110,20 @@ insert_edge!(graph, s0, d_exit, track = false)
|
||||
@test length(graph.dirtyNodes) == 26
|
||||
@test length(graph.diff) == (addedNodes = 0, removedNodes = 0, addedEdges = 0, removedEdges = 0)
|
||||
|
||||
@test !is_dependent(graph, d_exit, d_exit)
|
||||
@test is_dependent(graph, d_v0_s0, v0)
|
||||
@test is_dependent(graph, d_v1_s0, v1)
|
||||
@test !is_dependent(graph, d_v0_s0, v1)
|
||||
@test is_dependent(graph, s0, d_PB)
|
||||
@test !is_dependent(graph, v0, uBp)
|
||||
@test !is_dependent(graph, PB, PA)
|
||||
|
||||
@test pairwise_independent(graph, [PB, PA, PBp, PAp])
|
||||
@test pairwise_independent(graph, [uB, uA, d_uBp_v1])
|
||||
@test !pairwise_independent(graph, [PB, PA, PBp, PAp, s0])
|
||||
@test !pairwise_independent(graph, [d_uB_v0, v0])
|
||||
@test !pairwise_independent(graph, [v0, d_v0_s0, s0, uB])
|
||||
|
||||
@test is_valid(graph)
|
||||
|
||||
@test is_entry_node(d_PB)
|
||||
|
Reference in New Issue
Block a user