public static RangeSet operator -(RangeSet R, double delta) { RangeSet s = new RangeSet(); foreach (var r in R) { s.Add(r - delta); } return(s); }
public static RangeSet operator *(RangeSet R1, IEnumerable <RangeSet> L) { RangeSet R = R1; foreach (var R2 in L) { R *= R2; } return(R); }
public bool Overlapped(RangeSet R) { foreach (var r in R) { if (this.Overlapped(r)) { return(true); } } return(false); }
public static RangeSet operator *(RangeSet R, Range range) { RangeSet list = new RangeSet(); foreach (var r in R) { if (r.Overlapped(range)) { list.Add(r * range); } } return(list); }
public static RangeSet operator *(RangeSet R1, RangeSet R2) { RangeSet R = new RangeSet(); foreach (var r2 in R2) { RangeSet S = R1 * r2; foreach (var s in S) { R.Add(s); } } return(R); }