Exemple #1
0
        public bool Equals(AssociationRule obj)
        {
            if (Conditions.Count != obj.Conditions.Count)
            {
                return(false);
            }

            if (!Decision.Attribute.Equals(obj.Decision.Attribute))
            {
                return(false);
            }

            bool result = true;

            for (int i = 0; i < Conditions.Count; i++)
            {
                if (result == true)
                {
                    if (!Conditions[i].Attribute.Equals(obj.Conditions[i].Attribute))
                    {
                        result = false;
                    }
                }
                else
                {
                    break;
                }
            }

            return(result);
        }
Exemple #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            AssociationRule p = obj as AssociationRule;

            if ((System.Object)p == null)
            {
                return(false);
            }

            return(Equals(p));
        }