Esempio n. 1
0
        internal bool ContainsOccurrence(IOccurrence occ)
        {
            if (occ == null)
            {
                throw new ArgumentNullException("occ");
            }

            return(TreeSet.ContainsKey(occ.TreeId) && TreeSet[occ.TreeId].ContainsOccurrence(occ));
        }
Esempio n. 2
0
        internal int AddOccurrence(IOccurrence occ)
        {
            if (occ == null)
            {
                throw new ArgumentNullException("occ");
            }
            if (occ.Depth != depth)
            {
                throw new InvalidOperationException("Depth mismatch.");
            }

            if (!TreeSet.ContainsKey(occ.TreeId))
            {
                TreeSet.Add(occ.TreeId, new TreeOccSet(occ.TreeId));
            }

            var temp = TreeSet[occ.TreeId].AddOccurrence(occ);

            RootOccurrenceCount += temp;

            return(temp);
        }
Esempio n. 3
0
 internal bool ContainsTree(TreeId treeId)
 {
     return(TreeSet.ContainsKey(treeId));
 }