Exemple #1
0
        public object Clone()
        {
            ArraySet temp = new ArraySet();

            foreach (double i in this.data)
            {
                temp.add(i);
            }
            return(temp);
        }
Exemple #2
0
        public ArraySet Union(ArraySet e)
        {
            ArraySet temp = (ArraySet)this.Clone();

            foreach (double j in e.data)
            {
                if (!temp.contains(j))
                {
                    temp.add(j);
                }
            }
            return(temp);
        }
Exemple #3
0
        public ArraySet intersection(ArraySet e)
        {
            ArraySet temp = new ArraySet();

            foreach (double i in this.data)
            {
                foreach (double j in e.data)
                {
                    if (i == j)
                    {
                        temp.add(i);
                        break;
                    }
                }
            }
            return(temp);
        }