///<summary> /// Add this constraint to the octagon ///</summary> override public bool AddToOctagon(CoreOctagon oct, IMutableSet <int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.x; affectedDimensions.Add(this.x); try { Rational c = this.c * 2; if (Rational.Min(c, oct.octagon[Matpos2(i, j)]) == c) { oct.octagon[Matpos2(i, j)] = c; return(true); } } catch (ArithmeticExceptionRational) { // We could not add the constraint because of an arithmetic exception return(false); } return(false); }
override public bool AddToOctagon(CoreOctagon oct, IMutableSet <int> affectedDimensions) { bool bInf = this.inf.AddToOctagon(oct, affectedDimensions); bool bSup = this.sup.AddToOctagon(oct, affectedDimensions); return(bInf || bSup); }
override public bool AddToOctagon(CoreOctagon oct, IMutableSet <int> affectedDimensions) { bool b1 = cachedXLeqY.AddToOctagon(oct, affectedDimensions); bool b2 = cachedYLeqX.AddToOctagon(oct, affectedDimensions); return(b1 || b2); }
override public bool AddToOctagon(CoreOctagon oct, IMutableSet <int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.y; affectedDimensions.Add(this.x); affectedDimensions.Add(this.y); if (this.c <= oct.octagon[Matpos2(i, j)]) { oct.octagon[Matpos2(i, j)] = this.c; return(true); } return(false); }
///<summary> /// Add this constraint to the octagon ///</summary> override public bool AddToOctagon(CoreOctagon oct, IMutableSet<int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.x; affectedDimensions.Add(this.x); try { Rational c = this.c * 2; if (Rational.Min(c, oct.octagon[Matpos2(i, j)]) == c) { oct.octagon[Matpos2(i, j)] = c; return true; } } catch (ArithmeticExceptionRational) { // We could not add the constraint because of an arithmetic exception return false; } return false; }
override public bool AddToOctagon(CoreOctagon oct, IMutableSet<int> affectedDimensions) { bool bInf = this.inf.AddToOctagon(oct, affectedDimensions); bool bSup = this.sup.AddToOctagon(oct, affectedDimensions); return bInf || bSup; }
override public bool AddToOctagon(CoreOctagon oct, IMutableSet<int> affectedDimensions) { bool b1 = this.cachedXLeqY.AddToOctagon(oct, affectedDimensions); bool b2 = this.cachedYLeqX.AddToOctagon(oct, affectedDimensions); return b1 || b2; }
override public bool AddToOctagon(CoreOctagon oct, IMutableSet<int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.y; affectedDimensions.Add(this.x); affectedDimensions.Add(this.y); if (this.c <= oct.octagon[Matpos2(i, j)]) { oct.octagon[Matpos2(i, j)] = this.c; return true; } return false; }
///<summary> /// Add this constraint to the octagon passed as parameter /// </summary> ///<param name="oct">the octagon where to add the constraint</param> ///<param name="affectedDimensions">The dimensions affected by the constraints</param> ///<returns>true iff the constraint has been added</returns> abstract public bool AddToOctagon(CoreOctagon oct, IMutableSet<int> affectedDimensions);
///<summary> /// Add this constraint to the octagon passed as a parameter ///</summary> ///<param name="oct">The octagon where to add the constraints</param> ///<returns>True iff the constraint has been added</returns> public bool AddToOctagon(CoreOctagon oct) { return this.AddToOctagon(oct, new Set<int>()); }
///<summary> /// Add this constraint to the octagon passed as parameter /// </summary> ///<param name="oct">the octagon where to add the constraint</param> ///<param name="affectedDimensions">The dimensions affected by the constraints</param> ///<returns>true iff the constraint has been added</returns> abstract public bool AddToOctagon(CoreOctagon oct, IMutableSet <int> affectedDimensions);
///<summary> /// Add this constraint to the octagon passed as a parameter ///</summary> ///<param name="oct">The octagon where to add the constraints</param> ///<returns>True iff the constraint has been added</returns> public bool AddToOctagon(CoreOctagon oct) { return(this.AddToOctagon(oct, new Set <int>())); }