Rework graph state

This commit is contained in:
2023-06-27 18:38:26 +02:00
parent 669444ebbd
commit 80a3912e3e
7 changed files with 358 additions and 139 deletions

View File

@ -9,7 +9,7 @@ function test_known_graphs()
@test props.compute_effort == 185
@test props.data == 102
@test length(generate_options(g_ABAB).fusions) == 10
@test length(generate_options(g_ABAB).nodeFusions) == 10
test_node_fusion(g_ABAB)
@ -33,11 +33,12 @@ function test_node_fusion(g)
data = props.data
compute_effort = props.compute_effort
while length(options.fusions) != 0
fusion = options.fusions[1]
n = node_fusion(g, fusion[1], fusion[2], fusion[3])
@test typeof(n.task) <: FusedComputeTask
@test length(g.nodes) == nodes_number - 2
while !isempty(options.nodeFusions)
fusion = options.nodeFusions[1]
@test typeof(fusion) <: NodeFusion
push_operation!(g, fusion)
props = graph_properties(g)
@test props.data < data