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 }}
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.
The current implementation that simply iterates over a graph is not as efficient as using a binary heap. Assess speed up by using a heap structure.
Greatly improve speed up by making nodes aware of which graph they are in. That way, a node can only be in one graph, but that's OK as it greatly improves performance. We will get rid of the map entirely.
The text was updated successfully, but these errors were encountered:
Turns out a heap structure is a lot more efficient than the current graph implementation, at least when it comes to addition and removal of the cheapest element. But a heap, as currently implemented via a simple slice, is not really efficient when it comes to determining whether an element exists in it.
In #12, a heap will be implemented that is a hybrid of a struct and a map. The struct will be used for efficient addition and removal of elements in sorted order while the map will be used to determine whether an element exists.
The current implementation that simply iterates over a graph is not as efficient as using a binary heap. Assess speed up by using a heap structure.
Greatly improve speed up by making nodes aware of which graph they are in. That way, a node can only be in one graph, but that's OK as it greatly improves performance. We will get rid of the map entirely.
The text was updated successfully, but these errors were encountered: