Example #1
0
        // *** IContentEquatable<Ref<T>> interface implementation ***

        public bool ContentEquals(Ref <T> other)
        {
            if (other == null)
            {
                return(false);
            }
            return(Utils.ObjectEquals(other.Val, Val, /*deepCmp=*/ true));
        }
Example #2
0
        // *** IContentEquatable<SparseVector<T>> interface implementation ***

        public bool ContentEquals(SparseVector <T> other)
        {
            if (other == null || mIdx.Count != other.mIdx.Count)
            {
                return(false);
            }
            for (int i = 0; i < mIdx.Count; i++)
            {
                if (mIdx[i] != other.mIdx[i] || !Utils.ObjectEquals(mDat[i], other.mDat[i], /*deepCmp=*/ true))
                {
                    return(false);
                }
            }
            return(true);
        }
Example #3
0
        // *** IContentEquatable<ArrayList<T>> interface implementation ***

        public bool ContentEquals(ArrayList <T> other)
        {
            if (other == null || Count != other.Count)
            {
                return(false);
            }
            for (int i = 0; i < Count; i++)
            {
                if (!Utils.ObjectEquals(this[i], other[i], /*deepCmp=*/ true))
                {
                    return(false);
                }
            }
            return(true);
        }
Example #4
0
 public bool Equals(T x, T y)
 {
     return(Utils.ObjectEquals(x, y, /*deepCmp=*/ true));
 }
Example #5
0
        // *** IContentEquatable<Pair<FirstT, SecondT>> interface implementation ***

        public bool ContentEquals(Pair <FirstT, SecondT> other)
        {
            return(Utils.ObjectEquals(m_first, other.m_first, /*deep_cmp=*/ true) && Utils.ObjectEquals(m_second, other.m_second, /*deep_cmp=*/ true));
        }