Exemplo n.º 1
0
        public IntegerSet Union(IntegerSet otherSet)
        {
            IntegerSet resultSet = new IntegerSet();
            int        counter   = 0;

            foreach (bool value in otherSet.Set)
            {
                if (value)
                {
                    resultSet.Set[counter] = true;
                }
                else if (_set[counter])
                {
                    resultSet.Set[counter] = true;
                }
                counter++;
            }

            return(resultSet);
        }
Exemplo n.º 2
0
 public Model()
 {
     union        = new IntegerSet();
     intersection = new IntegerSet();
 }