IMP Reference Guide
2.15.0
The Integrative Modeling Platform
|
The heapq algorithm is a min-heap. More...
Inherits tuple.
The heapq algorithm is a min-heap.
I want a max-heap, 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 34 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 min-heap into a max-heap, the lower than comparison is transformed into a greater-than
Definition at line 51 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 44 of file solutions_io.py.