@@ -310,6 +310,61 @@ struct FooNumber <: Number end
310310 @test MemoryLayout (LowerTriangular (T)) isa BidiagonalLayout{FillLayout,FillLayout}
311311 @test MemoryLayout (UnitUpperTriangular (T)) isa BidiagonalLayout{FillLayout,FillLayout}
312312 @test MemoryLayout (UnitLowerTriangular (T)) isa BidiagonalLayout{FillLayout,FillLayout}
313+
314+ B = Bidiagonal (Fill (1 ,11 ), Fill (2 ,10 ), :U )
315+ @test MemoryLayout (B) isa BidiagonalLayout{FillLayout,FillLayout}
316+
317+ S = SymTridiagonal (Fill (1 ,11 ), Fill (2 ,10 ))
318+ @test MemoryLayout (S) isa SymTridiagonalLayout{FillLayout,FillLayout}
319+
320+
321+ @test ArrayLayouts. mul (Eye {Int} (11 ), 1 : 11 ) ≡ 1 : 11
322+ @test ArrayLayouts. mul (Eye (11 ), 1 : 11 ) isa AbstractVector{Float64}
323+ @test ArrayLayouts. mul ((1 : 11 )' , Eye {Int} (11 )) isa AbstractMatrix{Int}
324+ @test ArrayLayouts. mul ((1 : 11 )' , Eye (11 )) isa AbstractMatrix{Float64}
325+
326+ D = Diagonal (1 : 5 )
327+ @test ArrayLayouts. mul (D, Eye {Int} (5 )) ≡ ArrayLayouts. mul (Eye {Int} (5 ), D) ≡ D
328+ @test ArrayLayouts. mul (D, Eye (5 )) == ArrayLayouts. mul (Eye (5 ), D) == D
329+
330+ @test ArrayLayouts. mul (Eye {Int} (11 ), T) isa Tridiagonal{Int,<: Fill }
331+ @test ArrayLayouts. mul (T, Eye {Int} (11 )) isa Tridiagonal{Int,<: Fill }
332+ @test ArrayLayouts. mul (Eye {Int} (11 ), T) isa Tridiagonal{Int,<: Fill }
333+ @test ArrayLayouts. mul (T, Eye {Int} (11 )) isa Tridiagonal{Int,<: Fill }
334+ @test ArrayLayouts. mul (Eye {Int} (11 ), B) isa Bidiagonal{Int,<: Fill }
335+ @test ArrayLayouts. mul (B, Eye {Int} (11 )) isa Bidiagonal{Int,<: Fill }
336+ @test ArrayLayouts. mul (Eye {Int} (11 ), B) isa Bidiagonal{Int,<: Fill }
337+ @test ArrayLayouts. mul (B, Eye {Int} (11 )) isa Bidiagonal{Int,<: Fill }
338+ @test ArrayLayouts. mul (Eye {Int} (11 ), S) isa SymTridiagonal{Int,<: Fill }
339+ @test ArrayLayouts. mul (S, Eye {Int} (11 )) isa SymTridiagonal{Int,<: Fill }
340+
341+ @test ArrayLayouts. mul (Eye (11 ), T) isa Tridiagonal{Float64,<: Fill }
342+ @test ArrayLayouts. mul (T, Eye (11 )) isa Tridiagonal{Float64,<: Fill }
343+ @test ArrayLayouts. mul (Eye (11 ), T) isa Tridiagonal{Float64,<: Fill }
344+ @test ArrayLayouts. mul (T, Eye (11 )) isa Tridiagonal{Float64,<: Fill }
345+ @test ArrayLayouts. mul (Eye (11 ), B) isa Bidiagonal{Float64,<: Fill }
346+ @test ArrayLayouts. mul (B, Eye (11 )) isa Bidiagonal{Float64,<: Fill }
347+ @test ArrayLayouts. mul (Eye (11 ), B) isa Bidiagonal{Float64,<: Fill }
348+ @test ArrayLayouts. mul (B, Eye (11 )) isa Bidiagonal{Float64,<: Fill }
349+
350+ @test ArrayLayouts. mul (Eye {Int} (10 ), Eye {Int} (10 )) ≡ Eye {Int} (10 )
351+ @test ArrayLayouts. mul (Eye {Int} (10 ), Eye (10 )) ≡ Eye (10 )
352+
353+ F = Diagonal (Fill (2 ,11 ))
354+ @test ArrayLayouts. mul (F, 1 : 11 ) ≡ 2 : 2 : 22
355+ @test ArrayLayouts. mul (F, Diagonal (1 : 11 )) ≡ ArrayLayouts. mul (Diagonal (1 : 11 ), F) ≡ Diagonal (2 : 2 : 22 )
356+ @test ArrayLayouts. mul (F, T) isa Tridiagonal{Int,<: Fill }
357+ @test ArrayLayouts. mul (T, F) isa Tridiagonal{Int,<: Fill }
358+ @test ArrayLayouts. mul (F, T) isa Tridiagonal{Int,<: Fill }
359+ @test ArrayLayouts. mul (T, F) isa Tridiagonal{Int,<: Fill }
360+ @test ArrayLayouts. mul (F, B) isa Bidiagonal{Int,<: Fill }
361+ @test ArrayLayouts. mul (B, F) isa Bidiagonal{Int,<: Fill }
362+ @test ArrayLayouts. mul (F, B) isa Bidiagonal{Int,<: Fill }
363+ @test ArrayLayouts. mul (B, F) isa Bidiagonal{Int,<: Fill }
364+ @test ArrayLayouts. mul (F, S) isa SymTridiagonal{Int,<: Fill }
365+ @test ArrayLayouts. mul (S, F) isa SymTridiagonal{Int,<: Fill }
366+
367+ @test ArrayLayouts. mul ((1 : 11 )' , F) isa AbstractMatrix{Int}
313368 end
314369
315370 @testset " Triangular col/rowsupport" begin
0 commit comments