예제 #1
0
        // *** IDeeplyCloneable interface implementation ***

        public BinaryVector DeepClone()
        {
            BinaryVector clone = new BinaryVector();

            clone.mVec = mVec.DeepClone();
            return(clone);
        }
예제 #2
0
        // *** ICloneable interface implementation ***

        public BinaryVector <T> Clone()
        {
            BinaryVector <T> clone = new BinaryVector <T>();

            clone.m_vec = new List <T>(m_vec);
            return(clone);
        }
예제 #3
0
        // *** IDeeplyCloneable interface implementation ***

        public BinaryVector <T> DeepClone()
        {
            List <T> vec = new List <T>(m_vec.Count);

            foreach (T item in m_vec)
            {
                vec.Add((T)Utils.Clone(item, /*deep_clone=*/ true));
            }
            BinaryVector <T> clone = new BinaryVector <T>();

            clone.m_vec = vec;
            return(clone);
        }
예제 #4
0
        // *** IContentEquatable<BinaryVector> interface implementation ***

        public bool ContentEquals(BinaryVector other)
        {
            if (other == null || mVec.Count != other.mVec.Count)
            {
                return(false);
            }
            for (int i = 0; i < mVec.Count; i++)
            {
                if (mVec[i].CompareTo(other.mVec[i]) != 0)
                {
                    return(false);
                }
            }
            return(true);
        }
예제 #5
0
            // *** IContentEquatable<BinaryVector<T>.ReadOnly> interface implementation ***

            public bool ContentEquals(BinaryVector <T> .ReadOnly other)
            {
                return(other != null && m_vec.ContentEquals(other.Inner));
            }
예제 #6
0
 public ReadOnly(BinarySerializer reader)
 {
     m_vec = new BinaryVector <T>(reader);
 }
예제 #7
0
 public ReadOnly(BinaryVector <T> vec)
 {
     Utils.ThrowException(vec == null ? new ArgumentNullException("vec") : null);
     m_vec = vec;
 }