public IEnumerable<SimpleRow> GetSupportedSets(Row transaction) { var res = new List<SimpleRow>(); foreach (var row in rows) { var intersection = transaction.Attributes.Intersect(row.Transaction); var count = intersection.Count(); if (count == transaction.Attributes.Length) { res.Add(row); } } return res; }
public IEnumerable<SimpleRow> GetSupportedSets(Row transaction) { var supportedRows = new List<SimpleRow>(); root.FillSupportedRows(supportedRows, transaction.Attributes, 0, new HashSet<ushort>(transaction.Attributes)); return supportedRows; }
public static bool IsItemsetSupported(ushort[] itemset, Row transaction) { var intersection = transaction.Attributes.Select(x => x).Intersect(itemset); var count = intersection.Count(); return count == itemset.Length; }
private void IncrementCounters(SimpleRow row, Row transaction) { if (transaction.Value == Relation.Complied) { row.RelationComplied += 1; } else { row.RelationNotComplied += 1; } }