ailist.LabeledIntervalArray.which_exact_match#

LabeledIntervalArray.which_exact_match(self, LabeledIntervalArray other_aiarray)#

Determine which intervals are present

Parameters:
other_aiarray : LabeledIntervalArray

Other LabeledIntervalArray object to compare to

Returns:

ref_indexnumpy.ndarray{int}

Indices of intervals in self that are present in other_aiarray

query_indexnumpy.ndarray{int}

Indices of intervals in other_aiarray that are present in self

Examples

>>> from ailist import LabeledIntervalArray
>>> ail = LabeledIntervalArray()
>>> ail.add(0, 10, "a")
>>> ail.add(20, 30, "a")
>>> ail.add(40, 50, "b")
>>> ail.add(60, 70, "b")
>>> ail2 = LabeledIntervalArray()
>>> ail2.add(0, 10, "a")
>>> ail2.add(20, 30, "b")
>>> ail2.add(40, 50, "c")
>>> ref_index, query_index = ail.is_exact_match(ail2)