You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the real benefit of using EntityFrame to represent a scene?
It seems like the only benefit is pre-allocation.
Alternative data structures:
Vector: would still allow pre-allocation, very simple to work with, retrieving a vehicle by its id would not be as straightforward (although it can be done with a one liner findfirst(x ->x.id == egoid, scene), but not very efficient)
Dict (or OrderedDict), mapping id to Entity, would be trivial to retrieve vehicles by their id, not as straightforward to pre-allocate.
Why would we change?
Using data structure from the standard library is easier to understand.
Potentially allows to use any AbstractArray type
My personal opinion is that using AbstractArray as a default is the easiest solution.
Ideally we want the flexibility to use either representation. Dictionary optimizes for accessing vehicle by id, one might want more complex data structures to e.g. find neighbors easily.
The text was updated successfully, but these errors were encountered:
What is the real benefit of using
EntityFrame
to represent a scene?It seems like the only benefit is pre-allocation.
Alternative data structures:
Vector
: would still allow pre-allocation, very simple to work with, retrieving a vehicle by itsid
would not be as straightforward (although it can be done with a one linerfindfirst(x ->x.id == egoid, scene)
, but not very efficient)Dict
(orOrderedDict
), mappingid
toEntity
, would be trivial to retrieve vehicles by theirid
, not as straightforward to pre-allocate.Why would we change?
AbstractArray
typeMy personal opinion is that using
AbstractArray
as a default is the easiest solution.Ideally we want the flexibility to use either representation. Dictionary optimizes for accessing vehicle by id, one might want more complex data structures to e.g. find neighbors easily.
The text was updated successfully, but these errors were encountered: