Exemplo n.º 1
0
        public bool Equals(ClassOfEquivalence other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!SetNum.Equals(other.SetNum))
            {
                return(false);
            }

            return(Symbols.SequenceEqual(other.Symbols));
        }
Exemplo n.º 2
0
        public int CompareTo(ClassOfEquivalence other)
        {
            if (other == null)
            {
                return(1);
            }

            int result = SetNum.CompareTo(other.SetNum);

            if (result != 0)
            {
                return(result);
            }

            return(Symbols.SequenceCompare(other.Symbols));
        }
Exemplo n.º 3
0
 public override int GetHashCode()
 {
     return(SetNum.GetHashCode() ^ Symbols.GetSequenceHashCode());
 }