File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,14 @@ function test_project_antihermitian(
4040 @test Ba === Ac
4141 @test isantihermitian (Ba)
4242 @test Ba ≈ Aa
43+
44+ # can we supply a destination
45+ Ac = deepcopy (A)
46+ Ba = instantiate_matrix (T, sz)
47+ Ba₂ = project_antihermitian! (Ac, Ba)
48+ @test A == Ac
49+ @test Ba₂ === Ba
50+ @test Ba₂ ≈ Aa
4351 end
4452
4553 # test approximate error calculation
@@ -79,6 +87,7 @@ function test_project_hermitian(
7987 Aa = (A - A' ) / 2
8088
8189 Bh = project_hermitian (A; blocksize = 16 )
90+
8291 @test ishermitian (Bh)
8392 @test Bh ≈ Ah
8493 @test A == Ac
@@ -91,6 +100,14 @@ function test_project_hermitian(
91100 @test Bh === Ac
92101 @test ishermitian (Bh)
93102 @test Bh ≈ Ah
103+
104+ # can we supply a destination
105+ Ac = deepcopy (A)
106+ Bh = instantiate_matrix (T, sz)
107+ Bh₂ = project_hermitian! (Ac, Bh)
108+ @test A == Ac
109+ @test Bh₂ === Bh
110+ @test Bh₂ ≈ Ah
94111 end
95112
96113 # test approximate error calculation
You can’t perform that action at this time.
0 commit comments