public static bool Disjoint(IntervalSet[] altLook)
{
bool collision = false;
IntervalSet combined = new IntervalSet();
if (altLook == null)
return false;
foreach (IntervalSet look in altLook)
{
if (look == null)
return false; // lookahead must've computation failed
if (!look.And(combined).IsNil)
{
collision = true;
break;
}
combined.AddAll(look);
}
return !collision;
}
}