reldist function

Calculate the relative distance between two sets of intervals