ailist.AIList.construct#

AIList.construct(self, int min_length=20)#

Construct ailist_t *Required to call intersect

Parameters:
min_length : int

Minimum length

Returns:

  • None

  • .. warning:: – This will re-sort intervals inplace

See also

AIList.sort

Sort intervals inplace

AIList.intersect

Find intervals overlapping given range

Examples

>>> from ailist import AIList
>>> ail = AIList()
>>> ail.add(1, 2)
>>> ail.add(3, 4)
>>> ail.add(2, 6)
>>> ail
AIList
  range: (1-6)
   (1-2, 0)
   (3-4, 1)
   (2-6, 2)
>>> ail.construct()
>>> ail
AIList
  range: (1-6)
   (1-2, 0)
   (2-6, 2)
   (3-4, 1)