Canonical equality of coloured interval rows
ID: canonical-equality-of-coloured-interval-rows
Represent a row by sorted disjoint half-open intervals, each carrying a colour. Merge touching intervals precisely when their colours agree. The resulting ordered maximal runs form a canonical representation of occupancy and colour: equality of those runs is equivalent to pointwise equality, while ignoring arbitrary subdivisions inside one colour run. For two rows containing and intervals, constructing and comparing runs takes time complexity, independently of coordinate magnitude or interval lengths.
New to topics? Read the docs here!