IMP  2.4.0
The Integrative Modeling Platform
Public Member Functions | List of all members
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

Note
This class is only available in Python.

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...
 

Member Function Documentation

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.


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