예제 #1
0
        internal bool ContainsOccurrence(IOccurrence occ)
        {
            if (occ == null)
            {
                throw new ArgumentNullException("occ");
            }

            return(TreeSet.ContainsKey(occ.TreeId) && TreeSet[occ.TreeId].ContainsOccurrence(occ));
        }
예제 #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);
        }
예제 #3
0
 internal bool ContainsTree(TreeId treeId)
 {
     return(TreeSet.ContainsKey(treeId));
 }