@@ -3,16 +3,16 @@ using LinearAlgebra: mul!
3
3
4
4
# y'*L is an exception to the left multiplication rule that makes a WrappedMap
5
5
6
- @static if VERSION ≥ v " 1.4.0"
6
+ @static if true # VERSION ≥ v"1.4.0"
7
7
8
8
function left_tester (L:: LinearMap{T} ) where {T}
9
- M,N = size (L)
9
+ M,N = size (L)
10
10
A = Matrix (L)
11
11
12
12
x = rand (T, N)
13
13
y = rand (T, M)
14
14
15
- # *
15
+ # *
16
16
@test y' * A ≈ y' * L
17
17
@test (y' * A) * x ≈ y' * (L * x) # associative
18
18
@test transpose (y) * A ≈ transpose (y) * L
@@ -32,24 +32,24 @@ function left_tester(L::LinearMap{T}) where {T}
32
32
mul! (b2, transpose (y), L, true , false ) # 5-arg
33
33
@test b1 ≈ b2
34
34
35
- true
35
+ true
36
36
end
37
37
38
38
39
39
@testset " left mul vec" begin
40
40
T = ComplexF32
41
- M,N = 5 ,5
42
- L = LinearMap {T} (cumsum, reverse ∘ cumsum ∘ reverse, N)
43
-
44
- @test left_tester (L) # FunctionMap
45
- @test left_tester (L' * L) # CompositeMap
46
- @test left_tester (2 L) # ScaledMap
47
- @test left_tester (kron (L,L' )) # KroneckerMap
48
- @test left_tester (2 L+ 3 L' ) # LinearCombination
49
- @test left_tester ([L L]) # BlockMap
50
-
51
- W = LinearMap (randn (T,5 ,4 ))
52
- @test left_tester (W) # WrappedMap
41
+ M,N = 5 ,5
42
+ L = LinearMap {T} (cumsum, reverse ∘ cumsum ∘ reverse, N)
43
+
44
+ @test left_tester (L) # FunctionMap
45
+ @test left_tester (L' * L) # CompositeMap
46
+ @test left_tester (2 L) # ScaledMap
47
+ @test left_tester (kron (L,L' )) # KroneckerMap
48
+ @test left_tester (2 L+ 3 L' ) # LinearCombination
49
+ @test left_tester ([L L]) # BlockMap
50
+
51
+ W = LinearMap (randn (T,5 ,4 ))
52
+ @test left_tester (W) # WrappedMap
53
53
end
54
54
55
55
end # version
0 commit comments