Built a Heap in Cluster algorithm Does anyone could explain in details how heap structure works in Cluster Algorithm?

I am planning to code CURE in Matlab (Clustering using representatives) but, at first, the paper mentions that all points of datasets are considerered as clusters and heap helps to merge new clusters and I do not know how exactly this data structure works in this algo.

Thanks for your support.
A heap works in clustering the same way it works outside of clustering.

It's purpose is to efficiently find the minimum or maximum of a set, remove it, then find the next.

Efficient implementations of heaps in scripting languages may be impossible. For good performance, you usually need low-level memory access to avoid copying.