public static bool SlowEquals(this IPGTerminalSet @this, IPGTerminalSet other) { Debug.Assert(@this != null); if (other == null) { return(false); } bool e = @this.ContainsEverything; if (e == other.ContainsEverything && @this.ContainsEOF == other.ContainsEOF) { if (e) { return(true); } var sub1 = @this.Subtract(other); if (sub1 == null || !sub1.IsEmptySet) { return(false); } var sub2 = other.Subtract(@this); return(sub2 != null && sub2.IsEmptySet); } return(false); }
public virtual IPGTerminalSet Optimize(IPGTerminalSet set, IPGTerminalSet dontcare) { return set.Subtract(dontcare); }
public static bool IsSubsetOf(this IPGTerminalSet @this, IPGTerminalSet other) { var tmp = @this.Subtract(other); return(tmp.IsEmptySet); }
public virtual IPGTerminalSet Optimize(IPGTerminalSet set, IPGTerminalSet dontcare) { return(set.Subtract(dontcare)); }