IMP logo
IMP Reference Guide  develop.9f755902c2,2022/12/07
The Integrative Modeling Platform
IMP.EMageFit.solutions_io.HeapRecord Class Reference

The heapq algorithm is a min-heap. More...

Inherits tuple.

Detailed Description

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

This class is only available in Python.

Definition at line 27 of file

Public Member Functions

def __lt__
 Compare. More...
def __new__
 Build from a tuple and the index used to compare. More...

Member Function Documentation

def IMP.EMageFit.solutions_io.HeapRecord.__lt__ (   self,


To convert the min-heap into a max-heap, the lower than comparison is transformed into a greater-than

Definition at line 44 of file

def IMP.EMageFit.solutions_io.HeapRecord.__new__ (   self,

Build from a tuple and the index used to compare.

Definition at line 37 of file

The documentation for this class was generated from the following file: