Skip to content

Commit 6791752

Browse files
committed
deprecate special "inner constructor" syntax. part of #11310
1 parent 7f34449 commit 6791752

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+298
-225
lines changed

NEWS.md

+12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ New language features
2222
Language changes
2323
----------------
2424

25+
* "Inner constructor" syntax for parametric types is deprecated. For example,
26+
in this definition:
27+
```
28+
type Foo{T,S<:Real}
29+
x
30+
Foo(x) = new(x)
31+
end
32+
```
33+
the syntax `Foo(x) = new(x)` actually defined a constructor for `Foo{T,S}`,
34+
i.e. the case where the type parameters are specified. For clarity, this
35+
definition now must be written as `Foo{T,S}(x) where {T,S<:Real} = new(x)`. ([#11310])
36+
2537
* Multi-line and single-line nonstandard command literals have been added. A
2638
nonstandard command literal is like a nonstandard string literal, but the
2739
syntax uses backquotes (``` ` ```) instead of double quotes, and the

base/LineEdit.jl

+5-4
Original file line numberDiff line numberDiff line change
@@ -1014,10 +1014,10 @@ type HistoryPrompt{T<:HistoryProvider} <: TextInterface
10141014
hp::T
10151015
complete
10161016
keymap_dict::Dict{Char,Any}
1017-
HistoryPrompt(hp) = new(hp, EmptyCompletionProvider())
1017+
HistoryPrompt{T}(hp) where T<:HistoryProvider = new(hp, EmptyCompletionProvider())
10181018
end
10191019

1020-
HistoryPrompt{T<:HistoryProvider}(hp::T) = HistoryPrompt{T}(hp)
1020+
HistoryPrompt(hp::T) where T<:HistoryProvider = HistoryPrompt{T}(hp)
10211021
init_state(terminal, p::HistoryPrompt) = SearchState(terminal, p, true, IOBuffer(), IOBuffer())
10221022

10231023
type PrefixSearchState <: ModeState
@@ -1054,10 +1054,11 @@ type PrefixHistoryPrompt{T<:HistoryProvider} <: TextInterface
10541054
parent_prompt::Prompt
10551055
complete
10561056
keymap_dict::Dict{Char,Any}
1057-
PrefixHistoryPrompt(hp, parent_prompt) = new(hp, parent_prompt, EmptyCompletionProvider())
1057+
PrefixHistoryPrompt{T}(hp, parent_prompt) where T<:HistoryProvider =
1058+
new(hp, parent_prompt, EmptyCompletionProvider())
10581059
end
10591060

1060-
PrefixHistoryPrompt{T<:HistoryProvider}(hp::T, parent_prompt) = PrefixHistoryPrompt{T}(hp, parent_prompt)
1061+
PrefixHistoryPrompt(hp::T, parent_prompt) where T<:HistoryProvider = PrefixHistoryPrompt{T}(hp, parent_prompt)
10611062
init_state(terminal, p::PrefixHistoryPrompt) = PrefixSearchState(terminal, p, "", IOBuffer())
10621063

10631064
write_prompt(terminal, s::PrefixSearchState) = write_prompt(terminal, s.histprompt.parent_prompt)

base/atomics.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Atomic operations use an `atomic_` prefix, such as `atomic_add!`,
5858
"""
5959
type Atomic{T<:AtomicTypes}
6060
value::T
61-
Atomic() = new(zero(T))
62-
Atomic(value) = new(value)
61+
Atomic{T}() where T<:AtomicTypes = new(zero(T))
62+
Atomic{T}(value) where T<:AtomicTypes = new(value)
6363
end
6464

6565
Atomic() = Atomic{Int}()

base/base.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,6 @@ immutable Nullable{T}
152152
hasvalue::Bool
153153
value::T
154154

155-
Nullable() = new(false)
156-
Nullable(value::T, hasvalue::Bool=true) = new(hasvalue, value)
155+
Nullable{T}() where T = new(false)
156+
Nullable{T}(value::T, hasvalue::Bool=true) where T = new(hasvalue, value)
157157
end

base/bitarray.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type BitArray{N} <: DenseArray{Bool, N}
88
chunks::Vector{UInt64}
99
len::Int
1010
dims::NTuple{N,Int}
11-
function BitArray(dims::Vararg{Int,N})
11+
function BitArray{N}(dims::Vararg{Int,N}) where N
1212
n = 1
1313
i = 1
1414
for d in dims
@@ -36,7 +36,7 @@ Construct an uninitialized `BitArray` with the given dimensions.
3636
Behaves identically to the [`Array`](@ref) constructor.
3737
"""
3838
BitArray(dims::Integer...) = BitArray(map(Int,dims))
39-
BitArray{N}(dims::NTuple{N,Int}) = BitArray{N}(dims...)
39+
BitArray(dims::NTuple{N,Int}) where N = BitArray{N}(dims...)
4040

4141
typealias BitVector BitArray{1}
4242
typealias BitMatrix BitArray{2}

base/boot.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ Void() = nothing
269269

270270
immutable VecElement{T}
271271
value::T
272-
VecElement(value::T) = new(value) # disable converting constructor in Core
272+
VecElement{T}(value::T) where T = new(value) # disable converting constructor in Core
273273
end
274-
VecElement{T}(arg::T) = VecElement{T}(arg)
274+
VecElement(arg::T) where T = VecElement{T}(arg)
275275

276276
# used by lowering of splicing unquote
277277
splicedexpr(hd::Symbol, args::Array{Any,1}) = (e=Expr(hd); e.args=args; e)

base/channels.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ type Channel{T} <: AbstractChannel
2929
# Used when sz_max == 0, i.e., an unbuffered channel.
3030
takers::Array{Condition}
3131

32-
function Channel(sz::Float64)
32+
function Channel{T}(sz::Float64) where T
3333
if sz == Inf
3434
Channel{T}(typemax(Int))
3535
else
3636
Channel{T}(convert(Int, sz))
3737
end
3838
end
39-
function Channel(sz::Integer)
39+
function Channel{T}(sz::Integer) where T
4040
if sz < 0
4141
throw(ArgumentError("Channel size must be either 0, a positive integer or Inf"))
4242
end
4343
new(Condition(), Condition(), :open, Nullable{Exception}(), Array{T}(0), sz, Array{Condition}(0))
4444
end
4545

4646
# deprecated empty constructor
47-
function Channel()
47+
function Channel{T}() where T
4848
depwarn(string("The empty constructor Channel() is deprecated. ",
4949
"The channel size needs to be specified explictly. ",
5050
"Defaulting to Channel{$T}(32)."), :Channel)
@@ -364,7 +364,7 @@ show(io::IO, c::Channel) = print(io, "$(typeof(c))(sz_max:$(c.sz_max),sz_curr:$(
364364
type ChannelIterState{T}
365365
hasval::Bool
366366
val::T
367-
ChannelIterState(x) = new(x)
367+
ChannelIterState{T}(has::Bool) where T = new(has)
368368
end
369369

370370
start{T}(c::Channel{T}) = ChannelIterState{T}(false)

base/dft.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ type ScaledPlan{T,P,N} <: Plan{T}
241241
p::P
242242
scale::N # not T, to avoid unnecessary promotion to Complex
243243
pinv::Plan
244-
ScaledPlan(p, scale) = new(p, scale)
244+
ScaledPlan{T,P,N}(p, scale) where {T,P,N} = new(p, scale)
245245
end
246-
(::Type{ScaledPlan{T}}){T,P,N}(p::P, scale::N) = ScaledPlan{T,P,N}(p, scale)
247-
ScaledPlan{T}(p::Plan{T}, scale::Number) = ScaledPlan{T}(p, scale)
246+
ScaledPlan{T}(p::P, scale::N) where {T,P,N} = ScaledPlan{T,P,N}(p, scale)
247+
ScaledPlan(p::Plan{T}, scale::Number) where T = ScaledPlan{T}(p, scale)
248248
ScaledPlan(p::ScaledPlan, α::Number) = ScaledPlan(p.p, p.scale * α)
249249

250250
size(p::ScaledPlan) = size(p.p)

base/dict.jl

+27-27
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,11 @@ type Dict{K,V} <: Associative{K,V}
9999
idxfloor::Int # an index <= the indexes of all used slots
100100
maxprobe::Int
101101

102-
function Dict()
102+
function Dict{K,V}() where V where K
103103
n = 16
104104
new(zeros(UInt8,n), Array{K,1}(n), Array{V,1}(n), 0, 0, 0, 1, 0)
105105
end
106-
function Dict(kv)
107-
h = Dict{K,V}()
108-
for (k,v) in kv
109-
h[k] = v
110-
end
111-
return h
112-
end
113-
Dict(p::Pair) = setindex!(Dict{K,V}(), p.second, p.first)
114-
function Dict(ps::Pair...)
115-
h = Dict{K,V}()
116-
sizehint!(h, length(ps))
117-
for p in ps
118-
h[p.first] = p.second
119-
end
120-
return h
121-
end
122-
function Dict(d::Dict{K,V})
106+
function Dict{K,V}(d::Dict{K,V}) where V where K
123107
if d.ndel > 0
124108
rehash!(d)
125109
end
@@ -128,17 +112,33 @@ type Dict{K,V} <: Associative{K,V}
128112
d.maxprobe)
129113
end
130114
end
115+
function Dict{K,V}(kv) where V where K
116+
h = Dict{K,V}()
117+
for (k,v) in kv
118+
h[k] = v
119+
end
120+
return h
121+
end
122+
Dict{K,V}(p::Pair) where V where K = setindex!(Dict{K,V}(), p.second, p.first)
123+
function Dict{K,V}(ps::Pair...) where V where K
124+
h = Dict{K,V}()
125+
sizehint!(h, length(ps))
126+
for p in ps
127+
h[p.first] = p.second
128+
end
129+
return h
130+
end
131131
# Note the constructors of WeakKeyDict mirror these here, keep in sync.
132132
Dict() = Dict{Any,Any}()
133133
Dict(kv::Tuple{}) = Dict()
134134
copy(d::Dict) = Dict(d)
135135

136136
const AnyDict = Dict{Any,Any}
137137

138-
Dict{K,V}(ps::Pair{K,V}...) = Dict{K,V}(ps)
139-
Dict{K }(ps::Pair{K}...,) = Dict{K,Any}(ps)
140-
Dict{V }(ps::(Pair{K,V} where K)...,) = Dict{Any,V}(ps)
141-
Dict( ps::Pair...) = Dict{Any,Any}(ps)
138+
Dict(ps::Pair{K,V}...) where {K,V} = Dict{K,V}(ps)
139+
Dict(ps::Pair{K}...,) where K = Dict{K,Any}(ps)
140+
Dict(ps::(Pair{K,V} where K)...,) where V = Dict{Any,V}(ps)
141+
Dict(ps::Pair...) = Dict{Any,Any}(ps)
142142

143143
function Dict(kv)
144144
try
@@ -599,9 +599,9 @@ immutable ImmutableDict{K, V} <: Associative{K,V}
599599
parent::ImmutableDict{K, V}
600600
key::K
601601
value::V
602-
ImmutableDict() = new() # represents an empty dictionary
603-
ImmutableDict(key, value) = (empty = new(); new(empty, key, value))
604-
ImmutableDict(parent::ImmutableDict, key, value) = new(parent, key, value)
602+
ImmutableDict{K,V}() where {K,V} = new() # represents an empty dictionary
603+
ImmutableDict{K,V}(key, value) where {K,V} = (empty = new(); new(empty, key, value))
604+
ImmutableDict{K,V}(parent::ImmutableDict, key, value) where {K,V} = new(parent, key, value)
605605
end
606606

607607
"""
@@ -621,8 +621,8 @@ Create a new entry in the Immutable Dictionary for the key => value pair
621621
622622
"""
623623
ImmutableDict
624-
ImmutableDict{K,V}(KV::Pair{K,V}) = ImmutableDict{K,V}(KV[1], KV[2])
625-
ImmutableDict{K,V}(t::ImmutableDict{K,V}, KV::Pair) = ImmutableDict{K,V}(t, KV[1], KV[2])
624+
ImmutableDict(KV::Pair{K,V}) where {K,V} = ImmutableDict{K,V}(KV[1], KV[2])
625+
ImmutableDict(t::ImmutableDict{K,V}, KV::Pair) where {K,V} = ImmutableDict{K,V}(t, KV[1], KV[2])
626626

627627
function in(key_value::Pair, dict::ImmutableDict, valcmp=(==))
628628
key, value = key_value

base/fft/FFTW.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ for P in (:cFFTWPlan, :rFFTWPlan, :r2rFFTWPlan) # complex, r2c/c2r, and r2r
211211
flags::UInt32 # planner flags
212212
region::Any # region (iterable) of dims that are transormed
213213
pinv::ScaledPlan
214-
function $P(plan::PlanPtr, flags::Integer, R::Any,
215-
X::StridedArray{T, N}, Y::StridedArray)
214+
function $P{T,K,inplace,N}(plan::PlanPtr, flags::Integer, R::Any,
215+
X::StridedArray{T, N}, Y::StridedArray) where {T<:fftwNumber,K,inplace,N}
216216
p = new(plan, size(X), size(Y), strides(X), strides(Y),
217217
alignment_of(X), alignment_of(Y), flags, R)
218218
finalizer(p, destroy_plan)

base/fft/dct.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type DCTPlan{T<:fftwNumber,K,inplace} <: Plan{T}
1515
nrm::Float64 # normalization factor
1616
region::Dims # dimensions being transformed
1717
pinv::DCTPlan{T}
18-
DCTPlan(plan,r,nrm,region) = new(plan,r,nrm,region)
18+
DCTPlan{T,K,inplace}(plan,r,nrm,region) where {T<:fftwNumber,K,inplace} = new(plan,r,nrm,region)
1919
end
2020

2121
size(p::DCTPlan) = size(p.plan)

base/iobuffer.jl

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ type AbstractIOBuffer{T<:AbstractVector{UInt8}} <: IO
1414
ptr::Int # read (and maybe write) pointer
1515
mark::Int # reset mark location for ptr (or <0 for no mark)
1616

17-
AbstractIOBuffer(data::T,readable::Bool,writable::Bool,seekable::Bool,append::Bool,maxsize::Int) =
17+
function AbstractIOBuffer{T}(data::T, readable::Bool, writable::Bool, seekable::Bool, append::Bool,
18+
maxsize::Int) where T<:AbstractVector{UInt8}
1819
new(data,readable,writable,seekable,append,length(data),maxsize,1,-1)
20+
end
1921
end
2022
typealias IOBuffer AbstractIOBuffer{Vector{UInt8}}
2123

22-
AbstractIOBuffer{T<:AbstractVector{UInt8}}(data::T, readable::Bool, writable::Bool, seekable::Bool, append::Bool, maxsize::Int) =
24+
function AbstractIOBuffer(data::T, readable::Bool, writable::Bool, seekable::Bool, append::Bool,
25+
maxsize::Int) where T<:AbstractVector{UInt8}
2326
AbstractIOBuffer{T}(data, readable, writable, seekable, append, maxsize)
27+
end
2428

2529
# allocate Vector{UInt8}s for IOBuffer storage that can efficiently become Strings
2630
StringVector(n::Integer) = Vector{UInt8}(_string_n(n))

base/linalg/arnoldi.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ type SVDOperator{T<:BlasFloat,S} <: AbstractArray{T, 2}
288288
X::S
289289
m::Int
290290
n::Int
291-
SVDOperator(X::AbstractMatrix) = new(X, size(X, 1), size(X, 2))
291+
SVDOperator{T,S}(X::AbstractMatrix) where {T<:BlasFloat,S} = new(X, size(X, 1), size(X, 2))
292292
end
293293

294-
function SVDOperator{T}(A::AbstractMatrix{T})
294+
function SVDOperator(A::AbstractMatrix{T}) where T
295295
Tnew = typeof(zero(T)/sqrt(one(T)))
296296
Anew = convert(AbstractMatrix{Tnew}, A)
297297
SVDOperator{Tnew,typeof(Anew)}(Anew)

base/linalg/bidiag.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type Bidiagonal{T} <: AbstractMatrix{T}
55
dv::Vector{T} # diagonal
66
ev::Vector{T} # sub/super diagonal
77
isupper::Bool # is upper bidiagonal (true) or lower (false)
8-
function Bidiagonal(dv::Vector{T}, ev::Vector{T}, isupper::Bool)
8+
function Bidiagonal{T}(dv::Vector{T}, ev::Vector{T}, isupper::Bool) where T
99
if length(ev) != length(dv)-1
1010
throw(DimensionMismatch("length of diagonal vector is $(length(dv)), length of off-diagonal vector is $(length(ev))"))
1111
end
@@ -52,7 +52,7 @@ julia> Bl = Bidiagonal(dv, ev, false) # ev is on the first subdiagonal
5252
⋅ ⋅ 9 4
5353
```
5454
"""
55-
Bidiagonal{T}(dv::AbstractVector{T}, ev::AbstractVector{T}, isupper::Bool) = Bidiagonal{T}(collect(dv), collect(ev), isupper)
55+
Bidiagonal(dv::AbstractVector{T}, ev::AbstractVector{T}, isupper::Bool) where T = Bidiagonal{T}(collect(dv), collect(ev), isupper)
5656
Bidiagonal(dv::AbstractVector, ev::AbstractVector) = throw(ArgumentError("did you want an upper or lower Bidiagonal? Try again with an additional true (upper) or false (lower) argument."))
5757

5858
"""
@@ -106,7 +106,7 @@ Bidiagonal(dv::AbstractVector, ev::AbstractVector, uplo::Char) = begin
106106
end
107107
Bidiagonal(collect(dv), collect(ev), isupper)
108108
end
109-
function Bidiagonal{Td,Te}(dv::AbstractVector{Td}, ev::AbstractVector{Te}, isupper::Bool)
109+
function Bidiagonal(dv::AbstractVector{Td}, ev::AbstractVector{Te}, isupper::Bool) where {Td,Te}
110110
T = promote_type(Td,Te)
111111
Bidiagonal(convert(Vector{T}, dv), convert(Vector{T}, ev), isupper)
112112
end
@@ -197,7 +197,7 @@ full(A::Bidiagonal) = convert(Array, A)
197197
promote_rule{T,S}(::Type{Matrix{T}}, ::Type{Bidiagonal{S}})=Matrix{promote_type(T,S)}
198198

199199
#Converting from Bidiagonal to Tridiagonal
200-
Tridiagonal{T}(M::Bidiagonal{T}) = convert(Tridiagonal{T}, M)
200+
Tridiagonal(M::Bidiagonal{T}) where T = convert(Tridiagonal{T}, M)
201201
function convert{T}(::Type{Tridiagonal{T}}, A::Bidiagonal)
202202
z = zeros(T, size(A)[1]-1)
203203
A.isupper ? Tridiagonal(z, convert(Vector{T},A.dv), convert(Vector{T},A.ev)) : Tridiagonal(convert(Vector{T},A.ev), convert(Vector{T},A.dv), z)

base/linalg/eigen.jl

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44
immutable Eigen{T,V,S<:AbstractMatrix,U<:AbstractVector} <: Factorization{T}
55
values::U
66
vectors::S
7-
Eigen(values::AbstractVector{V}, vectors::AbstractMatrix{T}) = new(values, vectors)
7+
Eigen{T,V,S,U}(values::AbstractVector{V}, vectors::AbstractMatrix{T}) where {T,V,S,U} =
8+
new(values, vectors)
89
end
9-
Eigen{T,V}(values::AbstractVector{V}, vectors::AbstractMatrix{T}) = Eigen{T,V,typeof(vectors),typeof(values)}(values, vectors)
10+
Eigen(values::AbstractVector{V}, vectors::AbstractMatrix{T}) where {T,V} =
11+
Eigen{T,V,typeof(vectors),typeof(values)}(values, vectors)
1012

1113
# Generalized eigenvalue problem.
1214
immutable GeneralizedEigen{T,V,S<:AbstractMatrix,U<:AbstractVector} <: Factorization{T}
1315
values::U
1416
vectors::S
15-
GeneralizedEigen(values::AbstractVector{V}, vectors::AbstractMatrix{T}) = new(values, vectors)
17+
GeneralizedEigen{T,V,S,U}(values::AbstractVector{V}, vectors::AbstractMatrix{T}) where {T,V,S,U} =
18+
new(values, vectors)
1619
end
17-
GeneralizedEigen{T,V}(values::AbstractVector{V}, vectors::AbstractMatrix{T}) = GeneralizedEigen{T,V,typeof(vectors),typeof(values)}(values, vectors)
20+
GeneralizedEigen(values::AbstractVector{V}, vectors::AbstractMatrix{T}) where {T,V} =
21+
GeneralizedEigen{T,V,typeof(vectors),typeof(values)}(values, vectors)
1822

1923

2024
function getindex(A::Union{Eigen,GeneralizedEigen}, d::Symbol)

base/linalg/hessenberg.jl

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
immutable Hessenberg{T,S<:AbstractMatrix} <: Factorization{T}
44
factors::S
55
τ::Vector{T}
6-
Hessenberg(factors::AbstractMatrix{T}, τ::Vector{T}) = new(factors, τ)
6+
Hessenberg{T,S}(factors::AbstractMatrix{T}, τ::Vector{T}) where {T,S<:AbstractMatrix} =
7+
new(factors, τ)
78
end
8-
Hessenberg{T}(factors::AbstractMatrix{T}, τ::Vector{T}) = Hessenberg{T,typeof(factors)}(factors, τ)
9+
Hessenberg(factors::AbstractMatrix{T}, τ::Vector{T}) where T = Hessenberg{T,typeof(factors)}(factors, τ)
910

1011
Hessenberg(A::StridedMatrix) = Hessenberg(LAPACK.gehrd!(A)...)
1112

@@ -55,7 +56,7 @@ end
5556
immutable HessenbergQ{T,S<:AbstractMatrix} <: AbstractMatrix{T}
5657
factors::S
5758
τ::Vector{T}
58-
HessenbergQ(factors::AbstractMatrix{T}, τ::Vector{T}) = new(factors, τ)
59+
HessenbergQ{T,S}(factors::AbstractMatrix{T}, τ::Vector{T}) where {T,S<:AbstractMatrix} = new(factors, τ)
5960
end
6061
HessenbergQ{T}(factors::AbstractMatrix{T}, τ::Vector{T}) = HessenbergQ{T,typeof(factors)}(factors, τ)
6162
HessenbergQ(A::Hessenberg) = HessenbergQ(A.factors, A.τ)

base/linalg/lq.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
immutable LQ{T,S<:AbstractMatrix} <: Factorization{T}
66
factors::S
77
τ::Vector{T}
8-
LQ(factors::AbstractMatrix{T}, τ::Vector{T}) = new(factors, τ)
8+
LQ{T,S}(factors::AbstractMatrix{T}, τ::Vector{T}) where {T,S<:AbstractMatrix} = new(factors, τ)
99
end
1010

1111
immutable LQPackedQ{T,S<:AbstractMatrix} <: AbstractMatrix{T}
1212
factors::Matrix{T}
1313
τ::Vector{T}
14-
LQPackedQ(factors::AbstractMatrix{T}, τ::Vector{T}) = new(factors, τ)
14+
LQPackedQ{T,S}(factors::AbstractMatrix{T}, τ::Vector{T}) where {T,S<:AbstractMatrix} = new(factors, τ)
1515
end
1616

17-
LQ{T}(factors::AbstractMatrix{T}, τ::Vector{T}) = LQ{T,typeof(factors)}(factors, τ)
18-
LQPackedQ{T}(factors::AbstractMatrix{T}, τ::Vector{T}) = LQPackedQ{T,typeof(factors)}(factors, τ)
17+
LQ(factors::AbstractMatrix{T}, τ::Vector{T}) where T = LQ{T,typeof(factors)}(factors, τ)
18+
LQPackedQ(factors::AbstractMatrix{T}, τ::Vector{T}) where T = LQPackedQ{T,typeof(factors)}(factors, τ)
1919

2020
"""
2121
lqfact!(A) -> LQ

0 commit comments

Comments
 (0)