@@ -177,10 +177,11 @@ Base.parent(vec::VectorOfArray) = vec.u
177177# ### 2-argument
178178
179179# first element representative
180- function DiffEqArray (vec:: AbstractVector , ts:: AbstractVector ; discretes = nothing , variables = nothing , parameters = nothing , independent_variables = nothing )
180+ function DiffEqArray (vec:: AbstractVector , ts:: AbstractVector ; discretes = nothing ,
181+ variables = nothing , parameters = nothing , independent_variables = nothing )
181182 sys = SymbolCache (something (variables, []),
182- something (parameters, []),
183- something (independent_variables, []))
183+ something (parameters, []),
184+ something (independent_variables, []))
184185 _size = size (vec[1 ])
185186 T = eltype (vec[1 ])
186187 return DiffEqArray{
@@ -199,10 +200,12 @@ function DiffEqArray(vec::AbstractVector, ts::AbstractVector; discretes = nothin
199200end
200201
201202# T and N from type
202- function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector ; discretes = nothing , variables = nothing , parameters = nothing , independent_variables = nothing ) where {T, N, VT <: AbstractArray{T, N} }
203+ function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector ;
204+ discretes = nothing , variables = nothing , parameters = nothing ,
205+ independent_variables = nothing ) where {T, N, VT <: AbstractArray{T, N} }
203206 sys = SymbolCache (something (variables, []),
204- something (parameters, []),
205- something (independent_variables, []))
207+ something (parameters, []),
208+ something (independent_variables, []))
206209 return DiffEqArray{
207210 eltype (eltype (vec)),
208211 N + 1 ,
221224# ### 3-argument
222225
223226# NTuple, T from type
224- function DiffEqArray (vec:: AbstractVector{T} , ts:: AbstractVector , :: NTuple{N, Int} ; discretes = nothing ) where {T, N}
227+ function DiffEqArray (vec:: AbstractVector{T} , ts:: AbstractVector ,
228+ :: NTuple{N, Int} ; discretes = nothing ) where {T, N}
225229 DiffEqArray{
226230 eltype (T), N, typeof (vec), typeof (ts), Nothing, Nothing, typeof (discretes)}(
227231 vec,
@@ -232,19 +236,23 @@ function DiffEqArray(vec::AbstractVector{T}, ts::AbstractVector, ::NTuple{N, Int
232236end
233237
234238# NTuple parameter
235- function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p:: NTuple{N2, Int} ; discretes = nothing ) where {T, N, VT <: AbstractArray{T, N} , N2}
236- DiffEqArray {eltype(T), N + 1, typeof(vec), typeof(ts), typeof(p), Nothing, typeof(discretes)} (vec,
239+ function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p:: NTuple{N2, Int} ;
240+ discretes = nothing ) where {T, N, VT <: AbstractArray{T, N} , N2}
241+ DiffEqArray{
242+ eltype (T), N + 1 , typeof (vec), typeof (ts), typeof (p), Nothing, typeof (discretes)}(
243+ vec,
237244 ts,
238245 p,
239246 nothing ,
240247 discretes)
241248end
242249
243250# first element representative
244- function DiffEqArray (vec:: AbstractVector , ts:: AbstractVector , p; discretes = nothing , variables = nothing , parameters = nothing , independent_variables = nothing )
251+ function DiffEqArray (vec:: AbstractVector , ts:: AbstractVector , p; discretes = nothing ,
252+ variables = nothing , parameters = nothing , independent_variables = nothing )
245253 sys = SymbolCache (something (variables, []),
246- something (parameters, []),
247- something (independent_variables, []))
254+ something (parameters, []),
255+ something (independent_variables, []))
248256 _size = size (vec[1 ])
249257 T = eltype (vec[1 ])
250258 return DiffEqArray{
@@ -263,11 +271,14 @@ function DiffEqArray(vec::AbstractVector, ts::AbstractVector, p; discretes = not
263271end
264272
265273# T and N from type
266- function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p; discretes = nothing , variables = nothing , parameters = nothing , independent_variables = nothing ) where {T, N, VT <: AbstractArray{T, N} }
274+ function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p;
275+ discretes = nothing , variables = nothing , parameters = nothing ,
276+ independent_variables = nothing ) where {T, N, VT <: AbstractArray{T, N} }
267277 sys = SymbolCache (something (variables, []),
268- something (parameters, []),
269- something (independent_variables, []))
270- DiffEqArray {eltype(T), N + 1, typeof(vec), typeof(ts), typeof(p), typeof(sys), typeof(discretes)} (vec,
278+ something (parameters, []),
279+ something (independent_variables, []))
280+ DiffEqArray{eltype (T), N + 1 , typeof (vec), typeof (ts),
281+ typeof (p), typeof (sys), typeof (discretes)}(vec,
271282 ts,
272283 p,
273284 sys,
277288# ### 4-argument
278289
279290# NTuple, T from type
280- function DiffEqArray (vec:: AbstractVector{T} , ts:: AbstractVector , :: NTuple{N, Int} , p; discretes = nothing ) where {T, N}
291+ function DiffEqArray (vec:: AbstractVector{T} , ts:: AbstractVector ,
292+ :: NTuple{N, Int} , p; discretes = nothing ) where {T, N}
281293 DiffEqArray{
282294 eltype (T), N, typeof (vec), typeof (ts), typeof (p), Nothing, typeof (discretes)}(
283295 vec,
@@ -288,8 +300,10 @@ function DiffEqArray(vec::AbstractVector{T}, ts::AbstractVector, ::NTuple{N, Int
288300end
289301
290302# NTuple parameter
291- function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p:: NTuple{N2, Int} , sys; discretes = nothing ) where {T, N, VT <: AbstractArray{T, N} , N2}
292- DiffEqArray {eltype(T), N + 1, typeof(vec), typeof(ts), typeof(p), typeof(sys), typeof(discretes)} (vec,
303+ function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p:: NTuple{N2, Int} , sys;
304+ discretes = nothing ) where {T, N, VT <: AbstractArray{T, N} , N2}
305+ DiffEqArray{eltype (T), N + 1 , typeof (vec), typeof (ts),
306+ typeof (p), typeof (sys), typeof (discretes)}(vec,
293307 ts,
294308 p,
295309 sys,
@@ -316,8 +330,10 @@ function DiffEqArray(vec::AbstractVector, ts::AbstractVector, p, sys; discretes
316330end
317331
318332# T and N from type
319- function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p, sys; discretes = nothing ) where {T, N, VT <: AbstractArray{T, N} }
320- DiffEqArray {eltype(T), N + 1, typeof(vec), typeof(ts), typeof(p), typeof(sys), typeof(discretes)} (vec,
333+ function DiffEqArray (vec:: AbstractVector{VT} , ts:: AbstractVector , p, sys;
334+ discretes = nothing ) where {T, N, VT <: AbstractArray{T, N} }
335+ DiffEqArray{eltype (T), N + 1 , typeof (vec), typeof (ts),
336+ typeof (p), typeof (sys), typeof (discretes)}(vec,
321337 ts,
322338 p,
323339 sys,
327343# ### 5-argument
328344
329345# NTuple, T from type
330- function DiffEqArray (vec:: AbstractVector{T} , ts:: AbstractVector , :: NTuple{N, Int} , p, sys; discretes = nothing ) where {T, N}
346+ function DiffEqArray (vec:: AbstractVector{T} , ts:: AbstractVector ,
347+ :: NTuple{N, Int} , p, sys; discretes = nothing ) where {T, N}
331348 DiffEqArray{
332349 eltype (T), N, typeof (vec), typeof (ts), typeof (p), typeof (sys), typeof (discretes)}(
333350 vec,
942959 VectorOfArray (rewrap (parent, u))
943960end
944961
945- rewrap (:: Array ,u) = u
962+ rewrap (:: Array , u) = u
946963rewrap (parent, u) = convert (typeof (parent), u)
947964
948965for (type, N_expr) in [
0 commit comments