File tree Expand file tree Collapse file tree 1 file changed +20
-16
lines changed
Expand file tree Collapse file tree 1 file changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,17 @@ using FillArrays: SquareEye
4444 end
4545 end
4646
47- A = Zeros(4 , 3 )
48- Q, R = @constinferred qr_compact(A)
49- @test Q * R == A
50- @test size(Q) == (4 , 3 )
51- @test size(R) == (3 , 3 )
52- @test Q == Matrix(I, (4 , 3 ))
53- @test Q isa Eye
54- @test iszero(R)
55- @test R isa Zeros
47+ for f in (qr_compact, left_orth)
48+ A = Zeros(4 , 3 )
49+ Q, R = @constinferred f(A)
50+ @test Q * R == A
51+ @test size(Q) == (4 , 3 )
52+ @test size(R) == (3 , 3 )
53+ @test Q == Matrix(I, (4 , 3 ))
54+ @test Q isa Eye
55+ @test iszero(R)
56+ @test R isa Zeros
57+ end
5658
5759 A = Zeros(4 , 3 )
5860 Q, R = @constinferred qr_full(A)
@@ -84,13 +86,15 @@ using FillArrays: SquareEye
8486 @test Q == Matrix(I, (3 , 4 ))
8587 @test Q isa Eye
8688
87- A = Zeros(3 , 4 )
88- L, Q = @constinferred lq_compact(A)
89- @test L * Q == A
90- @test L == Zeros(3 , 3 )
91- @test L isa Zeros
92- @test Q == Eye(3 , 4 )
93- @test Q isa Eye
89+ for f in (lq_compact, right_orth)
90+ A = Zeros(3 , 4 )
91+ L, Q = @constinferred lq_compact(A)
92+ @test L * Q == A
93+ @test L == Zeros(3 , 3 )
94+ @test L isa Zeros
95+ @test Q == Eye(3 , 4 )
96+ @test Q isa Eye
97+ end
9498
9599 A = Zeros(3 , 4 )
96100 L, Q = @constinferred lq_full(A)
You can’t perform that action at this time.
0 commit comments