Esempio n. 1
0
 /// <summary>
 /// Checks if two sets are disjunctive.
 /// </summary>
 /// <param name="rightSide">First set</param>
 /// <param name="leftSide">Second set</param>
 /// <returns>True if two sets are disjunctive, false otherwise.</returns>
 public static bool SetsSeparated(FrequentItemSet <T> rightSide, FrequentItemSet <T> leftSide)
 {
     return(leftSide.ItemSet.All(item => !rightSide.ItemSet.Contains(item)));
 }
Esempio n. 2
0
 /// <summary>
 /// Checks if the set is equal to the another set
 /// </summary>
 /// <param name="other">The other set to be compared to</param>
 /// <returns>true, if two sets contains the same elements, false otherwise</returns>
 public bool Equals(FrequentItemSet <T> other)
 {
     return(other.ItemSet.Count == ItemSet.Count && ItemSet.All(item => other.ItemSet.Contains(item)));
 }