@@ -86,23 +86,23 @@ promotedomainspace(P::Operator,sp::Space,cursp::Space) =
86
86
87
87
88
88
89
+ const VectorOrTupleOfOp{O<: Operator } = Union{AbstractVector{O}, Tuple{O, Vararg{O}}}
89
90
90
-
91
- function promoterangespace (ops:: Union{AbstractVector{O}, Tuple{O,Vararg{O}}} ) where O<: Operator
91
+ function promoterangespace (ops:: VectorOrTupleOfOp{O} ) where O<: Operator
92
92
isempty (ops) && return strictconvert (Vector{Operator{eltype (O)}}, ops)
93
93
k= findmaxrangespace (ops)
94
94
# TODO : T might be incorrect
95
95
T= mapreduce (eltype,promote_type,ops)
96
96
Operator{T}[promoterangespace (op,k) for op in ops]
97
97
end
98
- function promotedomainspace (ops:: Union{AbstractVector{O}, Tuple{O,Vararg{O}} } ) where O<: Operator
98
+ function promotedomainspace (ops:: VectorOrTupleOfOp{O } ) where O<: Operator
99
99
isempty (ops) && return strictconvert (Vector{Operator{eltype (O)}}, ops)
100
100
k= findmindomainspace (ops)
101
101
# TODO : T might be incorrect
102
102
T= mapreduce (eltype,promote_type,ops)
103
103
Operator{T}[promotedomainspace (op,k) for op in ops]
104
104
end
105
- function promotedomainspace (ops:: Union{AbstractVector{ O}, Tuple{O,Vararg{O}}} , S:: Space ) where O<: Operator
105
+ function promotedomainspace (ops:: VectorOrTupleOfOp{ O} , S:: Space ) where O<: Operator
106
106
isempty (ops) && return strictconvert (Vector{Operator{eltype (O)}}, ops)
107
107
k= conversion_type (findmindomainspace (ops),S)
108
108
# TODO : T might be incorrect
@@ -158,8 +158,8 @@ spacescompatible(A::Operator,B::Operator) =
158
158
159
159
160
160
# It's important that domain space is promoted first as it might impact range space
161
- promotespaces (ops:: AbstractVector ) = promoterangespace (promotedomainspace (ops))
162
- function promotespaces (ops:: AbstractVector , b:: Fun )
161
+ promotespaces (ops:: VectorOrTupleOfOp{<:Operator} ) = promoterangespace (promotedomainspace (ops))
162
+ function promotespaces (ops:: VectorOrTupleOfOp{<:Operator} , b:: Fun )
163
163
A= promotespaces (ops)
164
164
if isa (rangespace (A),AmbiguousSpace)
165
165
# try setting the domain space
0 commit comments