Skip to content

Commit

Permalink
add tests for ExactTreewidth solver with scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrogantGao committed Aug 7, 2024
1 parent 5adb03f commit a921571
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/treewidth.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ using Test, Random
cc = contraction_complexity(optcode, size_dict)
@test cc.sc == 7
@test decorate(eincode)(tensors...) decorate(optcode)(tensors...)

eincode = OMEinsumContractionOrders.EinCode([['a', 'b'], ['a', 'c', 'd'], ['b', 'c', 'e'], ['e'], ['f'], Char[]], ['a', 'f'])
tensors = tensors fill(2.0,())
optcode = optimize_exact_treewidth(optimizer, eincode, size_dict)
cc = contraction_complexity(optcode, size_dict)
@test decorate(eincode)(tensors...) decorate(optcode)(tensors...)
end

0 comments on commit a921571

Please sign in to comment.