/// <summary> /// Creates the octagonal constraint x = y /// </summary> public OctagonConstraintXEqualY(int x, int y) { this.x = x; this.y = y; this.c = Rational.For(0); cachedXLeqY = new OctagonConstraintXMinusY(this.x, this.y, 0); // x <= y cachedYLeqX = new OctagonConstraintXMinusY(this.y, this.x, 0); // y <= x }
///<summary> /// Construct an object for the equality x == c ///</summary> public OctagonConstraintXEqualConst(int i, Rational c) { this.x = i; this.y = -1; this.c = c; this.inf = new OctagonConstraintMinusX(i, -this.c); this.sup = new OctagonConstraintX(i, this.c); this.toAdd = new Set <OctagonConstraint>(); this.toAdd.Add(this.inf); this.toAdd.Add(this.sup); }
///<summary> /// Construct an object for the equality x == c ///</summary> public OctagonConstraintXEqualConst(int i, Rational c) { this.x = i; this.y = -1; this.c = c; this.inf = new OctagonConstraintMinusX(i, -this.c); this.sup = new OctagonConstraintX(i, this.c); this.toAdd = new Set<OctagonConstraint>(); this.toAdd.Add(this.inf); this.toAdd.Add(this.sup); }
/// <summary> /// Creates the octagonal constraint x = y /// </summary> public OctagonConstraintXEqualY(int x, int y) { this.x = x; this.y = y; this.c = Rational.For(0); this.cachedXLeqY = new OctagonConstraintXMinusY(this.x, this.y, 0); // x <= y this.cachedYLeqX = new OctagonConstraintXMinusY(this.y, this.x, 0); // y <= x }
static public OctagonConstraint For(int a, int x, Rational k) { return(OctagonConstraint.For(a, x, (Int32)k)); }