Open bruttenberg opened 10 years ago
Need to memoize ElementCollection.get
Which universe is get defined in? Is it the universe of the element collection on which you're getting the reference or the universe calling get?
@mreposa Please check whether this issue still holds.
In particle filtering, it is common to get an element from the static universe. This is usually accomplished by calling get(Reference) on the static universe, which creates a SingleValuedReference for the reference on the static universe. The problem is that if this is done at each time step, a single value reference is added to the static universe at each time step, growing the number of elements in the universe. This is problematic since we could end up with a lot reference elements that are no longer needed.
I'm not sure of the solution yet, but in the interim, exposing the getElementByReference can help solve the problem, though it is not really correct Figaro semantics.