コード例 #1
0
ファイル: FakeHashTree.cs プロジェクト: mkaczynski/MED
        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;
        }
コード例 #2
0
ファイル: HashTree.cs プロジェクト: mkaczynski/MED
 public IEnumerable<SimpleRow> GetSupportedSets(Row transaction)
 {
     var supportedRows = new List<SimpleRow>();
     root.FillSupportedRows(supportedRows, transaction.Attributes, 0, new HashSet<ushort>(transaction.Attributes));
     return supportedRows;
 }
コード例 #3
0
ファイル: FakeHashTree.cs プロジェクト: mkaczynski/MED
 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;
 }
コード例 #4
0
ファイル: BaseAlgorithm.cs プロジェクト: mkaczynski/MED
 private void IncrementCounters(SimpleRow row, Row transaction)
 {
     if (transaction.Value == Relation.Complied)
     {
         row.RelationComplied += 1;
     }
     else
     {
         row.RelationNotComplied += 1;
     }
 }