@@ -136,11 +136,13 @@ LMcat{T} = Union{LinearMapAA{T}, LinearMap{T}, UniformScaling{T}} # settle
136
136
137
137
# convert to something suitable for LinearMap.*cat
138
138
function lm_promote (A:: LMcat )
139
+ # @show typeof(A)
139
140
A isa LinearMapAA ? A. _lmap :
140
- # A isa AbstractMatrix ? LinearMap(A) :
141
141
A isa UniformScaling ? A : # leave unchanged - ok for LinearMaps.*cat
142
- # A isa LinearMap ?
143
142
A # otherwise it is this
143
+ # throw("bug") # should only be only of LMcat types
144
+ # A isa AbstractMatrix ? LinearMap(A) :
145
+ # A isa LinearMap ?
144
146
end
145
147
146
148
# single-letter codes for cat objects, e.g., [A I A] becomes "AIA"
504
506
test hcat vcat hvcat
505
507
"""
506
508
function LinearMapAA_test_cat (A:: LinearMapAA )
507
- # L = LinearMap(x -> A*x, y -> A'*y, size(A,1), size(A,2))
509
+ Lm = LinearMap {eltype(A)} (x -> A* x, y -> A' * y, size (A,1 ), size (A,2 ))
508
510
M = Matrix (A)
511
+ # B0 = [M Lm] # fails! todo: bug in LinearMaps ??
509
512
510
513
#=
511
514
# cannot get cat with AbstractMatrix to work
@@ -541,11 +544,17 @@ function LinearMapAA_test_cat(A::LinearMapAA)
541
544
# [I I A; I A I], # unsupported
542
545
[A A I; 2 A 3 A 4 I],
543
546
[A I I; 2 A 3 I 4 I],
547
+ # [A Lm], # need one LinearMap test for codecov (see below)
544
548
]
545
549
546
550
list1 = fun0 (A)
547
551
list2 = fun0 (M)
548
552
553
+ if true # need one LinearMap test for codecov
554
+ push! (list1, [A Lm])
555
+ push! (list2, [M M]) # trick because [M Lm] fails
556
+ end
557
+
549
558
for ii in 1 : length (list1)
550
559
b1 = list1[ii]
551
560
b2 = list2[ii]
0 commit comments