IMP Reference Guide
develop.9f755902c2,2022/12/07
The Integrative Modeling Platform

The heapq algorithm is a minheap. More...
Inherits tuple.
The heapq algorithm is a minheap.
I want a maxheap, that pops the larger values out of the heap. For that I have to modify the comparison function and also set the index that is used for the comparison. The index corresponds to the restraint that we desired to order by
Definition at line 27 of file solutions_io.py.
Public Member Functions  
def  __lt__ 
Compare. More...  
def  __new__ 
Build from a tuple and the index used to compare. More...  
def IMP.EMageFit.solutions_io.HeapRecord.__lt__  (  self,  
other  
) 
Compare.
To convert the minheap into a maxheap, the lower than comparison is transformed into a greaterthan
Definition at line 44 of file solutions_io.py.
def IMP.EMageFit.solutions_io.HeapRecord.__new__  (  self,  
x,  
i  
) 
Build from a tuple and the index used to compare.
Definition at line 37 of file solutions_io.py.