File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 133133 @test to_std_string (contract (D, C)) == " DᵀCᵀ"
134134end
135135
136+ @testset " to_std_string output is correct with matrix-matrix element wise multiplication" begin
137+ A = Monomial (" A" , Upper (1 ), Lower (2 ))
138+ B = Monomial (" B" , Upper (1 ), Lower (2 ))
139+
140+ @test to_std_string (A .* B) == " A ⊙ B"
141+ @test to_std_string (A .* A) == " A ⊙ A"
142+ @test to_std_string (dc. evaluate (A * (A .* B))) == " A(A ⊙ B)"
143+ @test to_std_string (dc. evaluate ((A .* B) * A)) == " (A ⊙ B)A"
144+ @test to_std_string (dc. evaluate (A .* (A * B))) == " AB ⊙ A"
145+ @test to_std_string (dc. evaluate ((A * B) .* A)) == " AB ⊙ A"
146+ end
147+
136148@testset " to_std_string output is correct with matrix-matrix sum" begin
137149 A = Monomial (" A" , Upper (1 ), Lower (2 ))
138150 B = Monomial (" B" , Upper (1 ), Lower (2 ))
You can’t perform that action at this time.
0 commit comments