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
I would like to request a feature addition to Chapel's Heap data structure: a clear() method. This method would allow users to efficiently clear an existing heap, removing all elements and resetting it to its initial state.
Use Case:
The clear() method would be useful in scenarios where the heap needs to be reused for multiple operations without reconstructing it entirely, improving code readability and potentially optimizing performance in iterative tasks.
Proposed Behavior:
Heap.clear() would empty all elements from the heap and reset it to its initial state, similar to how clear() functions are implemented in other data structures.
Thank you for considering this feature. It would enhance the flexibility of Heap and streamline code that requires frequent reinitialization of heaps.
Is this issue currently blocking your progress?
no
Code Sample
// Please provide source code that you'd like Chapel to support.// You can insert your code inline if it's not too long.// Otherwise, you can attach it as a file or provide a URL to it.// To the extent possible, providing simplified programs demonstrating the// problem will be appreciated.
The text was updated successfully, but these errors were encountered:
Summary of Feature
Description:
I would like to request a feature addition to Chapel's Heap data structure: a clear() method. This method would allow users to efficiently clear an existing heap, removing all elements and resetting it to its initial state.
Use Case:
The clear() method would be useful in scenarios where the heap needs to be reused for multiple operations without reconstructing it entirely, improving code readability and potentially optimizing performance in iterative tasks.
Proposed Behavior:
Heap.clear() would empty all elements from the heap and reset it to its initial state, similar to how clear() functions are implemented in other data structures.
Thank you for considering this feature. It would enhance the flexibility of Heap and streamline code that requires frequent reinitialization of heaps.
Is this issue currently blocking your progress?
no
Code Sample
The text was updated successfully, but these errors were encountered: