Skip to content

Commit 4541eea

Browse files
committed
🤖 Format .jl files
1 parent 06be7db commit 4541eea

1 file changed

Lines changed: 38 additions & 7 deletions

File tree

src/abstract.jl

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function LinearOperator{T, S}(
7171
ctprod!::Fct,
7272
nprod::I,
7373
ntprod::I,
74-
nctprod::I
74+
nctprod::I,
7575
) where {T, S, I <: Integer, F, Ft, Fct}
7676
Mv5, Mtu5 = S(undef, 0), S(undef, 0)
7777
nargs = get_nargs(prod!)
@@ -99,8 +99,30 @@ function LinearOperator{T, S}(
9999
end
100100

101101
# backward compatibility (not inferrable; use LinearOperator{T, S} if you want something inferrable)
102-
LinearOperator{T}(nrow, ncol, symmetric, hermitian, prod!, tprod!, ctprod!, nprod, ntprod, nctprod; S::Type = Vector{T}) where {T} =
103-
LinearOperator{T, S}(nrow, ncol, symmetric, hermitian, prod!, tprod!, ctprod!, nprod, ntprod, nctprod)
102+
LinearOperator{T}(
103+
nrow,
104+
ncol,
105+
symmetric,
106+
hermitian,
107+
prod!,
108+
tprod!,
109+
ctprod!,
110+
nprod,
111+
ntprod,
112+
nctprod;
113+
S::Type = Vector{T},
114+
) where {T} = LinearOperator{T, S}(
115+
nrow,
116+
ncol,
117+
symmetric,
118+
hermitian,
119+
prod!,
120+
tprod!,
121+
ctprod!,
122+
nprod,
123+
ntprod,
124+
nctprod,
125+
)
104126

105127
LinearOperator{T, S}(
106128
nrow::I,
@@ -109,13 +131,21 @@ LinearOperator{T, S}(
109131
hermitian::Bool,
110132
prod!,
111133
tprod!,
112-
ctprod!
134+
ctprod!,
113135
) where {T, S, I <: Integer} =
114136
LinearOperator{T, S}(nrow, ncol, symmetric, hermitian, prod!, tprod!, ctprod!, 0, 0, 0)
115137

116138
# backward compatibility (not inferrable)
117-
LinearOperator{T}(nrow, ncol, symmetric, hermitian, prod!, tprod!, ctprod!; S::Type = Vector{T}) where {T} =
118-
LinearOperator{T, S}(nrow, ncol, symmetric, hermitian, prod!, tprod!, ctprod!)
139+
LinearOperator{T}(
140+
nrow,
141+
ncol,
142+
symmetric,
143+
hermitian,
144+
prod!,
145+
tprod!,
146+
ctprod!;
147+
S::Type = Vector{T},
148+
) where {T} = LinearOperator{T, S}(nrow, ncol, symmetric, hermitian, prod!, tprod!, ctprod!)
119149

120150
# create operator from other operators with +, *, vcat,...
121151
# TODO: this is not a type, so it should not be uppercase
@@ -164,7 +194,8 @@ CompositeLinearOperator(
164194
tprod!::Ft,
165195
ctprod!::Fct,
166196
args5::Bool;
167-
S::Type = Vector{T}) where {I <: Integer, F, Ft, Fct} =
197+
S::Type = Vector{T},
198+
) where {I <: Integer, F, Ft, Fct} =
168199
CompositeLinearOperator(T, nrow, ncol, symmetric, hermitian, prod!, tprod!, ctprod!, args5, S)
169200

170201
nprod(op::AbstractLinearOperator) = op.nprod

0 commit comments

Comments
 (0)