Пример #1
0
        public void EmptyUnion()
        {
            IntDomain a	= new IntDomain( 8, 55 );

            Assert.AreEqual( a.Union( a ), a );
            Assert.AreEqual( a.Union( new IntDomain() ), a );
        }
Пример #2
0
        public void EmptyUnion()
        {
            IntDomain a = new IntDomain(8, 55);

            Assert.AreEqual(a.Union(a), a);
            Assert.AreEqual(a.Union(new IntDomain()), a);
        }
Пример #3
0
        public void Union6()
        {
            IntDomain a = new IntDomain(-20, -1);
            IntDomain b = new IntDomain(0, 19);
            IntDomain c = b.Union(a);

            Validate(c, -20, 19);
        }
Пример #4
0
        public void Union1()
        {
            IntDomain a = new IntDomain(-20, -1);
            IntDomain b = new IntDomain(0, 19);
            IntDomain c = a.Union(b);

            Validate(c, -20, 19);
        }
Пример #5
0
        protected void UpdateVar0()
        {
            IntDomain domain = new IntDomain();

            foreach (FltInterval flt_iset in FltVar.Domain)
            {
                domain = domain.Union((int)Math.Floor(flt_iset.Min), (int)Math.Ceiling(flt_iset.Max));
            }

            IntVar.Intersect(domain);
        }
Пример #6
0
        private void UpdateVar0()
        {
            IntDomain domain = IntDomain.Empty;

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

            Var0.Intersect(domain);
        }
Пример #7
0
		private void UpdateVar0()
		{
			IntDomain domain	= new IntDomain();

			foreach( int idx in Var1 )
			{
				domain	= domain.Union( VarList[ idx ].Domain );
			}
		
			Var0.Intersect( domain );
		}
Пример #8
0
        public IntDomain Union()
        {
            IntDomain domain = new IntDomain();

            foreach (IntVar var in this)
            {
                domain = domain.Union(var.Domain);
            }

            return(domain);
        }
Пример #9
0
        private void UpdateVar1()
        {
            IntDomain diff = new IntDomain();

            foreach (int idx in Index)
            {
                FltVar var = VarList[idx];

                if (!Var0.Domain.IntersectsWith(var.Domain))
                {
                    diff = diff.Union(idx);
                }
            }

            Index.Difference(diff);
        }
Пример #10
0
        private void UpdateVar1()
        {
            IntDomain diff = IntDomain.Empty;

            foreach (int idx in Index)
            {
                IntDomain dom = m_DomainList[idx];

                if (!Var0.Domain.IntersectsWith(dom))
                {
                    diff = diff.Union(idx);
                }
            }

            Index.Difference(diff);
        }
Пример #11
0
        public void Union6()
        {
            IntDomain a	= new IntDomain( -20, -1 );
            IntDomain b	= new IntDomain( 0, 19 );
            IntDomain c	= b.Union( a );

            Validate( c, -20, 19 );
        }
Пример #12
0
        public void Union1()
        {
            IntDomain a	= new IntDomain( -20, -1 );
            IntDomain b	= new IntDomain( 0, 19 );
            IntDomain c	= a.Union( b );

            Validate( c, -20, 19 );
        }
Пример #13
0
        public IntDomain Union()
        {
            IntDomain domain	= new IntDomain();

            foreach( IntVar var in this )
            {
                domain	= domain.Union( var.Domain );
            }

            return domain;
        }