Skip to content

Change Simulation struct field "components" from Type Dict to NamedTuple Type. #124

@Zooaal

Description

@Zooaal

@behinger
At the moment, the Simulation struct is defined with the field "components" which is a Union of either a Dictionary(Char, Vector(AbstractComponent)) or an Vector(AbstractComponent). As it is not possible for a Dictionary to allow the inheritance of Vector(AbstractComponent), the Dictionary must be replaced by a NamedTuple.
This has to be done in the several lines of code:

<:Dict{<:Char,<:Vector{<:AbstractComponent}},

maxoffset(d::Dict{<:Char,<:Vector{<:AbstractComponent}}) = maximum(maxoffset.(values(d)))

minoffset(d::Dict{<:Char,<:Vector{<:AbstractComponent}}) = minimum(minoffset.(values(d)))

and possible more...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions