@@ -247,22 +247,22 @@ Directed(s::AbstractVector{<:Symbol}) = AnnotatedSym(Directed, s)
247
247
248
248
abstract type ComponentModel end
249
249
250
- struct VertexModel{F,G,FFT,OF,MM,EX <: Union{Nothing,Vector{<:SymbolicIndex}} } <: ComponentModel
250
+ struct VertexModel <: ComponentModel
251
251
name:: Symbol
252
252
# main function
253
- f:: F
253
+ f:: Any
254
254
sym:: Vector{Symbol}
255
- mass_matrix:: MM
255
+ mass_matrix:: Any
256
256
# outputs
257
- g:: G
257
+ g:: Any
258
258
outsym:: Vector{Symbol}
259
- ff:: FFT
259
+ ff:: FeedForwardType
260
260
# parameters, optional input sym and optional external inputs
261
261
psym:: Vector{Symbol}
262
262
insym:: Union{Nothing, Vector{Symbol}}
263
- extin:: EX
263
+ extin:: Union{Nothing, Vector{<:SymbolicIndex}}
264
264
# observed
265
- obsf:: OF
265
+ obsf:: Any
266
266
obssym:: Vector{Symbol}
267
267
# metadata
268
268
symmetadata:: Dict{Symbol,Dict{Symbol, Any}}
@@ -302,22 +302,22 @@ All Symbol arguments can be used to set default values, i.e. `psym=[:K=>1, :p]`.
302
302
VertexModel (; kwargs... ) = _construct_comp (VertexModel, Base. inferencebarrier (kwargs))
303
303
VertexModel (v:: VertexModel ; kwargs... ) = _reconstruct_comp (VertexModel, v, Base. inferencebarrier (kwargs))
304
304
305
- struct EdgeModel{F,G,FFT,OF,MM,EX <: Union{Nothing,Vector{<:SymbolicIndex}} } <: ComponentModel
305
+ struct EdgeModel <: ComponentModel
306
306
name:: Symbol
307
307
# main function
308
- f:: F
308
+ f:: Any
309
309
sym:: Vector{Symbol}
310
- mass_matrix:: MM
310
+ mass_matrix:: Any
311
311
# outputs
312
- g:: G
312
+ g:: Any
313
313
outsym: :@NamedTuple {src:: Vector{Symbol} ,dst:: Vector{Symbol} }
314
- ff:: FFT
314
+ ff:: FeedForwardType
315
315
# parameters, optional input sym and optional external inputs
316
316
psym:: Vector{Symbol}
317
317
insym:: Union{Nothing, @NamedTuple{src::Vector{Symbol},dst::Vector{Symbol}}}
318
- extin:: EX
318
+ extin:: Union{Nothing, Vector{<:SymbolicIndex}}
319
319
# observed
320
- obsf:: OF
320
+ obsf:: Any
321
321
obssym:: Vector{Symbol}
322
322
# metadata
323
323
symmetadata:: Dict{Symbol,Dict{Symbol, Any}}
@@ -576,8 +576,8 @@ Fills up type parameters with `nothing` to ensure `Core.Compiler.isconstType`
576
576
for GPU compatibility.
577
577
"""
578
578
dispatchT (:: T ) where {T<: ComponentModel } = dispatchT (T)
579
- dispatchT (T:: Type{<:VertexModel} ) = VertexModel{ nothing , nothing , nothing , nothing , nothing ,Nothing}
580
- dispatchT (T:: Type{<:EdgeModel} ) = EdgeModel{ nothing , nothing , nothing , nothing , nothing ,Nothing}
579
+ dispatchT (T:: Type{<:VertexModel} ) = VertexModel
580
+ dispatchT (T:: Type{<:EdgeModel} ) = EdgeModel
581
581
582
582
# TODO : introduce batchequal hash for faster batching of component models
583
583
batchequal (a, b) = false
0 commit comments