public override void Update() { // v0 = v1 + val // v1 = v0 - val Var0.Intersect(Var1.Domain + Domain); Var1.Intersect(Var0.Domain - Domain); }
public override void Update() { // v0 = val / v1 // v1 = val / v0 Var0.Intersect(Domain / Var1.Domain); Var1.Intersect(Domain / Var0.Domain); }
public override void Update() { // v0 = v1 * val // v1 = v0 / val Var0.Intersect(Var1.Domain * Domain); Var1.Intersect(Var0.Domain / Domain); }
public void Update2() { FltDomain dom0 = Domain * Var1.Domain; FltDomain dom1 = dom0 / Domain; // v0 = val * v1 // v1 = v0 / val Var0.Intersect(dom0); Var1.Intersect(dom1); }
private void UpdateVar0() { IntDomain domain = IntDomain.Empty; foreach (int idx in Var1) { domain = domain.Union(m_DomainList[idx]); } Var0.Intersect(domain); }
private void UpdateVar0() { FltDomain domain = new FltDomain(); foreach (int idx in Var1) { domain = domain.Union(VarList[idx].Domain); } Var0.Intersect(domain); }
public override void Update() { double min0 = Math.Min(Var0.Min, Epsilon.Prev(Var1.Min)); double max0 = Math.Min(Var0.Max, Epsilon.Prev(Var1.Max)); double min1 = Math.Max(Epsilon.Next(Var0.Min), Var1.Min); double max1 = Math.Max(Epsilon.Next(Var0.Max), Var1.Max); Var0.Intersect(min0, max0); Var1.Intersect(min1, max1); }
public override void Update() { if (VarList.Count > 0) { Var0.Intersect(VarList.MaxInterval); foreach (FltVar var in VarList) { var.Max = Var0.Max; } } }
public override void Update() { int sum_min = 0; int sum_max = 0; for (int idx = 0; idx < VarList.Count; ++idx) { IntDomain dom = VarList[idx].Domain; sum_min += dom.Min; sum_max += dom.Max; } Var0.Intersect(sum_min, sum_max); if (Var0.Domain.IsEmpty()) { return; } for (int idx = 0; idx < VarList.Count; ++idx) { IntVar var = VarList[idx]; int min = Var0.Min - (sum_max - var.Max); int max = Var0.Max - (sum_min - var.Min); if (min > var.Min || max < var.Max) { sum_min -= var.Min; sum_max -= var.Max; var.Intersect(min, max); if (var.Domain.IsEmpty()) { break; } sum_min += var.Min; sum_max += var.Max; Var0.Intersect(sum_min, sum_max); if (Var0.Domain.IsEmpty()) { break; } idx = -1; } } }
private void UpdateVar0() { if (VarList.Count > 0) { IntDomain domain = VarList.Front().Domain *m_IntArray[0]; for (int idx = 1; idx < VarList.Count; ++idx) { domain += VarList[idx].Domain * m_IntArray[idx]; } Var0.Intersect(domain); } }
public override void Update() { if (VarList.Count > 0) { FltDomain domain = VarList[0].Domain; for (int idx = 1; idx < VarList.Count; ++idx) { domain *= VarList[idx].Domain; } Var0.Intersect(domain); } }
public override void Update() { if (VarList.Count == 0) { return; } Var0.Intersect(VarList.MinInterval); foreach (IntVar var in VarList) { var.Min = Var0.Min; } }
public override void Update() { double sum_min = 0; double sum_max = 0; for (int i = 0; i < VarList.Count; ++i) { FltInterval intv = VarList[i].Domain.Interval; sum_min += intv.Min; sum_max += intv.Max; } Var0.Intersect(sum_min, sum_max); for (int idx = 0; idx < VarList.Count; ++idx) { FltVar var = VarList[idx]; double min = Var0.Min - (sum_max - var.Max); double max = Var0.Max - (sum_min - var.Min); if (min > var.Min || max < var.Max) { sum_min -= var.Min; sum_max -= var.Max; var.Intersect(min, max); if (var.Domain.IsEmpty()) { break; } sum_min += var.Min; sum_max += var.Max; Var0.Intersect(sum_min, sum_max); if (Var0.Domain.IsEmpty()) { break; } idx = -1; } } }
public override void Update() { if (VarList.Count == 0) { return; } IntDomain domain = VarList.Front().Domain; for (int idx = 1; idx < VarList.Count; ++idx) { domain *= VarList[idx].Domain; } Var0.Intersect(domain); }
public override void Update() { Var0.Intersect(Value + 1, int.MaxValue); }
public override void Update() { Var0.Intersect(int.MinValue, Value - 1); }
public override void Update() { Var0.Intersect(double.MinValue, Epsilon.Prev(m_Value)); }
public override void Update() { Var0.Intersect(double.MinValue, m_Value); }
public override void Update() { Var0.Intersect(Math.Min(Var0.Min, Var1.Min), Math.Min(Var0.Max, Var1.Max)); Var1.Intersect(Math.Max(Var0.Min, Var1.Min), Math.Max(Var0.Max, Var1.Max)); }
public override void Update() { Var0.Intersect(Epsilon.Next(m_Value), double.MaxValue); }
public override void Update() { Var0.Intersect(-Var1.Domain); Var1.Intersect(-Var0.Domain); }
public override void Update() { Var0.Intersect(Var1.Domain.Pow(m_Power)); //Var1.Intersect( Var0.Domain.Pow( 1.0 / m_Power ) ); }
public override void Update() { Var0.Intersect(Var1.Domain.Interval.Exp()); Var1.Intersect(Var0.Domain.Interval.Log()); }
public override void Update() { Var0.Intersect(m_Value); }
public override void Update() { Var0.Intersect(Math.Min(Var0.Min, Var1.Min - m_Offset), Math.Min(Var0.Max, Var1.Max - m_Offset)); Var1.Intersect(Math.Max(Var0.Min + m_Offset, Var1.Min), Math.Max(Var0.Max + m_Offset, Var1.Max)); }