Packing algorithm implementing the ligolw_cafe file list packing algorithm.
Inherits lalburst.packing.Packer.
Public Member Functions | |
| def | set_offset_vectors (self, offset_vectors) |
| Set the list of offset vectors to be considered when deciding the bins in which each file belongs. More... | |
| def | pack (self, cache_entry) |
| Find all bins in which this lal.utils.CacheEntry instance belongs, merge them, and add this cache entry to the result. More... | |
Public Member Functions inherited from lalburst.packing.Packer | |
| def | __init__ (self, bins) |
| Set the list of bins on which we shall operate. More... | |
| def | pack (self, size, obj) |
| Pack an object of given size into the bins. More... | |
| def | packlist (self, size_object_pairs) |
| Pack a list of (size, object) tuples into the bins. More... | |
Data Fields | |
| offset_vectors | |
| max_gap | |
Data Fields inherited from lalburst.packing.Packer | |
| bins | |
| def lalburst.cafe.CafePacker.set_offset_vectors | ( | self, | |
| offset_vectors | |||
| ) |
| def lalburst.cafe.CafePacker.pack | ( | self, | |
| cache_entry | |||
| ) |
Find all bins in which this lal.utils.CacheEntry instance belongs, merge them, and add this cache entry to the result.
Create a new bin for this cache entry if it does not belong in any of the existing bins.
The cache entry "belongs" in a bin if after each of the preset offset vectors (see the .set_offset_vectors() method) is applied to both the contents of a bin and the cache entry, any of the segment lists of the bin and cache entry are found to intersect. When checking for intersection, only the segment lists whose instrument names are listed in the offset vector are compared.
Reimplemented from lalburst.packing.Packer.