예제 #1
0
 public override void Update()
 {
     // v0	= v1 + val
     // v1	= v0 - val
     Var0.Intersect(Var1.Domain + Domain);
     Var1.Intersect(Var0.Domain - Domain);
 }
예제 #2
0
 public override void Update()
 {
     // v0	= val / v1
     // v1	= val / v0
     Var0.Intersect(Domain / Var1.Domain);
     Var1.Intersect(Domain / Var0.Domain);
 }
예제 #3
0
 public override void Update()
 {
     // v0	= v1 * val
     // v1	= v0 / val
     Var0.Intersect(Var1.Domain * Domain);
     Var1.Intersect(Var0.Domain / Domain);
 }
예제 #4
0
        public void Update2()
        {
            FltDomain dom0 = Domain * Var1.Domain;
            FltDomain dom1 = dom0 / Domain;

            // v0	= val * v1
            // v1	= v0 / val
            Var0.Intersect(dom0);
            Var1.Intersect(dom1);
        }
예제 #5
0
        private void UpdateVar0()
        {
            IntDomain domain = IntDomain.Empty;

            foreach (int idx in Var1)
            {
                domain = domain.Union(m_DomainList[idx]);
            }

            Var0.Intersect(domain);
        }
예제 #6
0
        private void UpdateVar0()
        {
            FltDomain domain = new FltDomain();

            foreach (int idx in Var1)
            {
                domain = domain.Union(VarList[idx].Domain);
            }

            Var0.Intersect(domain);
        }
예제 #7
0
        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);
        }
예제 #8
0
        public override void Update()
        {
            if (VarList.Count > 0)
            {
                Var0.Intersect(VarList.MaxInterval);

                foreach (FltVar var in VarList)
                {
                    var.Max = Var0.Max;
                }
            }
        }
예제 #9
0
        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;
                }
            }
        }
예제 #10
0
        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);
            }
        }
예제 #11
0
        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);
            }
        }
예제 #12
0
        public override void Update()
        {
            if (VarList.Count == 0)
            {
                return;
            }

            Var0.Intersect(VarList.MinInterval);

            foreach (IntVar var in VarList)
            {
                var.Min = Var0.Min;
            }
        }
예제 #13
0
        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;
                }
            }
        }
예제 #14
0
        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);
        }
예제 #15
0
 public override void Update()
 {
     Var0.Intersect(Value + 1, int.MaxValue);
 }
예제 #16
0
 public override void Update()
 {
     Var0.Intersect(int.MinValue, Value - 1);
 }
예제 #17
0
 public override void Update()
 {
     Var0.Intersect(double.MinValue, Epsilon.Prev(m_Value));
 }
예제 #18
0
 public override void Update()
 {
     Var0.Intersect(double.MinValue, m_Value);
 }
예제 #19
0
 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));
 }
예제 #20
0
 public override void Update()
 {
     Var0.Intersect(Epsilon.Next(m_Value), double.MaxValue);
 }
예제 #21
0
 public override void Update()
 {
     Var0.Intersect(-Var1.Domain);
     Var1.Intersect(-Var0.Domain);
 }
예제 #22
0
 public override void Update()
 {
     Var0.Intersect(Var1.Domain.Pow(m_Power));
     //Var1.Intersect( Var0.Domain.Pow( 1.0 / m_Power ) );
 }
예제 #23
0
 public override void Update()
 {
     Var0.Intersect(Var1.Domain.Interval.Exp());
     Var1.Intersect(Var0.Domain.Interval.Log());
 }
예제 #24
0
 public override void Update()
 {
     Var0.Intersect(m_Value);
 }
예제 #25
0
 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));
 }