Branch: refs/heads/master
Revision: 563c9c1
Author: e-kayrakli
Log Message:
Merge pull request #15997 from Rapiz1/heap
Add module Heap
Heap, a.k.a. priority_queue, is a very common data structure in
most languages. It provides operations to quickly insert elements
and query the top element.
The heap uses a comparator to determine it’s a min-heap or a
max-heap. The default argument defaultComparator
will create
a max-heap. Passing a reverseComparator
will create a min-heap.
Related: https://github.com/chapel-lang/chapel/issues/15667
[Contributed by @Rapiz1]
[Reviewed by @krishnadey30, @cassella and @e-kayrakli]
[Tested and merged by @e-kayrakli]
Test:
- [x] standard
- [x] gasnet
- [x] heap tests with valgrind (slightly earlier version)
- [x] heap tests with memleaks (slightly earlier version)
Modified Files:
A .vscode/settings.json
A modules/standard/Heap.chpl
A test/library/standard/Heap/assignment/heapAssignment.chpl
A test/library/standard/Heap/assignment/heapAssignment.good
A test/library/standard/Heap/consume/heapConsume.chpl
A test/library/standard/Heap/consume/heapConsume.good
A test/library/standard/Heap/createHeap/createHeapFromArray.chpl
A test/library/standard/Heap/createHeap/createHeapFromArray.good
A test/library/standard/Heap/createHeap/createHeapFromList.chpl
A test/library/standard/Heap/createHeap/createHeapFromList.good
A test/library/standard/Heap/isEmpty/heapIsEmpty.chpl
A test/library/standard/Heap/isEmpty/heapIsEmpty.good
A test/library/standard/Heap/push/heapPush.chpl
A test/library/standard/Heap/push/heapPush.good
A test/library/standard/Heap/size/heapSize.chpl
A test/library/standard/Heap/size/heapSize.good
A test/library/standard/Heap/toArray/heapToArray.chpl
A test/library/standard/Heap/toArray/heapToArray.good
A test/library/standard/Heap/type/HeapTest.chpl
A test/library/standard/Heap/type/HeapTest.notest
A test/library/standard/Heap/type/testBorrowed.chpl
A test/library/standard/Heap/type/testBorrowed.good
A test/library/standard/Heap/type/testNilableBorrowed.chpl
A test/library/standard/Heap/type/testNilableBorrowed.good
A test/library/standard/Heap/type/testNilableOwned.chpl
A test/library/standard/Heap/type/testNilableOwned.good
A test/library/standard/Heap/type/testNilableShared.chpl
A test/library/standard/Heap/type/testNilableShared.good
A test/library/standard/Heap/type/testNilableTuple.chpl
A test/library/standard/Heap/type/testNilableTuple.good
A test/library/standard/Heap/type/testNilableUnmanaged.chpl
A test/library/standard/Heap/type/testNilableUnmanaged.good
A test/library/standard/Heap/type/testOwned.chpl
A test/library/standard/Heap/type/testOwned.good
A test/library/standard/Heap/type/testRecord.chpl
A test/library/standard/Heap/type/testRecord.good
A test/library/standard/Heap/type/testShared.chpl
A test/library/standard/Heap/type/testShared.good
A test/library/standard/Heap/type/testTuple.chpl
A test/library/standard/Heap/type/testTuple.good
A test/library/standard/Heap/type/testTuple2.chpl
A test/library/standard/Heap/type/testTuple2.good
A test/library/standard/Heap/type/testTuple3.chpl
A test/library/standard/Heap/type/testTuple3.good
A test/library/standard/Heap/type/testUnmanaged.chpl
A test/library/standard/Heap/type/testUnmanaged.good
M modules/Makefile
Compare: https://github.com/chapel-lang/chapel/compare/365c8b5391c4...563c9c115899