IMP Reference Guide
develop.cb469e0f11,2024/05/28
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.