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
{{ message }}
Repository navigation
Make learnerND datastructures immutable where possible #54
opened by Joseph Weston (@jbweston) at 2018-07-10T13:16:25.518Z
At the moment there are a few datastructures that are described as "sets". where possible we should make these frozenset to remove the possibility of them being modified.
originally posted by Jorn Hoofwijk (@Jorn) at 2018-07-13T11:46:10.397Z on GitLab
Wauw, according to this thread , a frozenset is hashable and can therefore be used as a dictionary key. Maybe this is a clean way to store simplices (rather than having a sorted tuple) in the triangulation/learner.
originally posted by Joseph Weston (@jbweston) at 2018-12-08T09:53:44.558Z on GitLab
@jbweston's illustration shows clearly that there's a clear benefit in implementing this issue.
No, I was just saying that we should prefer tuples over sets where possible, but that some of the structures that currently are sets should be frozenset if they can be
Activity
basnijholt commentedon Dec 19, 2018
originally posted by Jorn Hoofwijk (@Jorn) at 2018-07-13T11:46:10.397Z on GitLab
Wauw, according to this thread , a frozenset is hashable and can therefore be used as a dictionary key. Maybe this is a clean way to store simplices (rather than having a sorted tuple) in the triangulation/learner.
any opinions?
basnijholt commentedon Dec 19, 2018
originally posted by Joseph Weston (@jbweston) at 2018-07-13T11:49:40.261Z on GitLab
just saying
basnijholt commentedon Dec 19, 2018
originally posted by Jorn Hoofwijk (@Jorn) at 2018-07-13T11:50:33.059Z on GitLab
ohw, that is a shame
basnijholt commentedon Dec 19, 2018
originally posted by Joseph Weston (@jbweston) at 2018-07-13T11:50:41.004Z on GitLab
because a
frozensetis a hashmap, whereas atupleis an arraybasnijholt commentedon Dec 19, 2018
originally posted by Bas Nijholt (@basnijholt) at 2018-12-07T20:00:10.457Z on GitLab
Will this ever be implemented? If not, can we close it?
basnijholt commentedon Dec 19, 2018
originally posted by Anton Akhmerov (@anton-akhmerov) at 2018-12-07T20:10:46.447Z on GitLab
It's ~"priority: low", so please let's not close it. @jbweston's illustration shows clearly that there's a clear benefit in implementing this issue.
basnijholt commentedon Dec 19, 2018
originally posted by Joseph Weston (@jbweston) at 2018-12-08T09:53:44.558Z on GitLab
No, I was just saying that we should prefer tuples over sets where possible, but that some of the structures that currently are sets should be frozenset if they can be
basnijholt commentedon Dec 19, 2018
originally posted by Anton Akhmerov (@anton-akhmerov) at 2018-12-08T20:25:06.809Z on GitLab
Indeed, I misunderstood.
Looking at the documentation of
LearnerNDI'm not sure what data structures would benefit from conversion.On the other hand, it does seem like we could make a bunch of methods private and therefore make the API simpler.
basnijholt commentedon Dec 19, 2018
originally posted by Bas Nijholt (@basnijholt) at 2018-12-11T11:56:04.313Z on GitLab
Like this @anton-akhmerov? https://gitlab.kwant-project.org/qt/adaptive/merge_requests/142