@@ -63,7 +63,7 @@ Base.size(A::BlockMap) = (last(last(A.rowranges)), last(last(A.colranges)))
63
63
# hcat
64
64
# ###########
65
65
"""
66
- hcat(As::Union{LinearMap,UniformScaling,AbstractVecOrMatOrQ }...)::BlockMap
66
+ hcat(As::Union{LinearMap,UniformScaling,AbstractVecOrMat }...)::BlockMap
67
67
68
68
Construct a (lazy) representation of the horizontal concatenation of the arguments.
69
69
All arguments are promoted to `LinearMap`s automatically.
@@ -81,7 +81,7 @@ julia> L * ones(Int, 6)
81
81
6
82
82
```
83
83
"""
84
- function Base. hcat (As:: Union{LinearMap, UniformScaling, AbstractVecOrMatOrQ } ...)
84
+ function Base. hcat (As:: Union{LinearMap, UniformScaling, AbstractVecOrMat } ...)
85
85
T = promote_type (map (eltype, As)... )
86
86
nbc = length (As)
87
87
98
98
# vcat
99
99
# ###########
100
100
"""
101
- vcat(As::Union{LinearMap,UniformScaling,AbstractVecOrMatOrQ }...)::BlockMap
101
+ vcat(As::Union{LinearMap,UniformScaling,AbstractVecOrMat }...)::BlockMap
102
102
103
103
Construct a (lazy) representation of the vertical concatenation of the arguments.
104
104
All arguments are promoted to `LinearMap`s automatically.
@@ -119,7 +119,7 @@ julia> L * ones(Int, 3)
119
119
3
120
120
```
121
121
"""
122
- function Base. vcat (As:: Union{LinearMap,UniformScaling,AbstractVecOrMatOrQ } ...)
122
+ function Base. vcat (As:: Union{LinearMap,UniformScaling,AbstractVecOrMat } ...)
123
123
T = promote_type (map (eltype, As)... )
124
124
nbr = length (As)
125
125
137
137
# hvcat
138
138
# ###########
139
139
"""
140
- hvcat(rows::Tuple{Vararg{Int}}, As::Union{LinearMap,UniformScaling,AbstractVecOrMatOrQ }...)::BlockMap
140
+ hvcat(rows::Tuple{Vararg{Int}}, As::Union{LinearMap,UniformScaling,AbstractVecOrMat }...)::BlockMap
141
141
142
142
Construct a (lazy) representation of the horizontal-vertical concatenation of the arguments.
143
143
The first argument specifies the number of arguments to concatenate in each block row.
@@ -165,7 +165,7 @@ julia> L * ones(Int, 6)
165
165
Base. hvcat
166
166
167
167
function Base. hvcat (rows:: Tuple{Vararg{Int}} ,
168
- As:: Union{LinearMap, UniformScaling, AbstractVecOrMatOrQ } ...)
168
+ As:: Union{LinearMap, UniformScaling, AbstractVecOrMat } ...)
169
169
nr = length (rows)
170
170
T = promote_type (map (eltype, As)... )
171
171
sum (rows) == length (As) ||
@@ -221,7 +221,7 @@ function check_dim(A, dim, n)
221
221
return nothing
222
222
end
223
223
224
- promote_to_lmaps_ (n:: Int , dim, A:: AbstractVecOrMatOrQ ) = (check_dim (A, dim, n); LinearMap (A))
224
+ promote_to_lmaps_ (n:: Int , dim, A:: AbstractVecOrMat ) = (check_dim (A, dim, n); LinearMap (A))
225
225
promote_to_lmaps_ (n:: Int , dim, J:: UniformScaling ) = UniformScalingMap (J. λ, n)
226
226
promote_to_lmaps_ (n:: Int , dim, A:: LinearMap ) = (check_dim (A, dim, n); A)
227
227
promote_to_lmaps (n, k, dim) = ()
322
322
# provide one global intermediate storage vector if necessary
323
323
__blockmul! (:: FiveArg , y, A, x:: AbstractVecOrMat , α, β) = ___blockmul! (y, A, x, α, β, nothing )
324
324
__blockmul! (:: ThreeArg , y, A, x:: AbstractVecOrMat , α, β) = ___blockmul! (y, A, x, α, β, similar (y))
325
- function ___blockmul! (y, A, x, α, β, :: Nothing )
325
+ function ___blockmul! (y, A, x:: AbstractVecOrMat , α, β, :: Nothing )
326
326
maps, rows, yinds, xinds = A. maps, A. rows, A. rowranges, A. colranges
327
327
mapind = 0
328
328
for (row, yi) in zip (rows, yinds)
@@ -336,7 +336,7 @@ function ___blockmul!(y, A, x, α, β, ::Nothing)
336
336
end
337
337
return y
338
338
end
339
- function ___blockmul! (y, A, x, α, β, z)
339
+ function ___blockmul! (y, A, x:: AbstractVecOrMat , α, β, z)
340
340
maps, rows, yinds, xinds = A. maps, A. rows, A. rowranges, A. colranges
341
341
mapind = 0
342
342
for (row, yi) in zip (rows, yinds)
@@ -497,7 +497,7 @@ BlockDiagonalMap(maps::LinearMap...) =
497
497
# since the below methods are more specific than the Base method,
498
498
# they would redefine Base/SparseArrays behavior
499
499
for k in 1 : 8 # is 8 sufficient?
500
- Is = ntuple (n-> :($ (Symbol (:A , n)):: AbstractVecOrMatOrQ ), Val (k- 1 ))
500
+ Is = ntuple (n-> :($ (Symbol (:A , n)):: AbstractVecOrMat ), Val (k- 1 ))
501
501
# yields (:A1, :A2, :A3, ..., :A(k-1))
502
502
L = :($ (Symbol (:A , k)):: LinearMap )
503
503
# yields :Ak
@@ -524,7 +524,7 @@ for k in 1:8 # is 8 sufficient?
524
524
end
525
525
526
526
"""
527
- blockdiag(As::Union{LinearMap,AbstractVecOrMatOrQ }...)::BlockDiagonalMap
527
+ blockdiag(As::Union{LinearMap,AbstractVecOrMat }...)::BlockDiagonalMap
528
528
529
529
Construct a (lazy) representation of the diagonal concatenation of the arguments.
530
530
To avoid fallback to the generic `SparseArrays.blockdiag`, there must be a `LinearMap`
@@ -533,7 +533,7 @@ object among the first 8 arguments.
533
533
SparseArrays. blockdiag
534
534
535
535
"""
536
- cat(As::Union{LinearMap,AbstractVecOrMatOrQ }...; dims=(1,2))::BlockDiagonalMap
536
+ cat(As::Union{LinearMap,AbstractVecOrMat }...; dims=(1,2))::BlockDiagonalMap
537
537
538
538
Construct a (lazy) representation of the diagonal concatenation of the arguments.
539
539
To avoid fallback to the generic `Base.cat`, there must be a `LinearMap`
0 commit comments