Пример #1
0
 internal RootOcc this[PreorderIndex rootIndex]
 {
     get
     {
         return(RootSet.ContainsKey(rootIndex) ? RootSet[rootIndex] : null);
     }
 }
Пример #2
0
        internal IOccurrence GetFirstOccAfterSpecifiedIndex(Depth depth, TreeId treeId, PreorderIndex rootIndex, PreorderIndex specifiedIndex)
        {
            if (!ContainsRootIndex(depth, treeId, rootIndex))
            {
                return(null);
            }

            var rOcc = this[depth][treeId][rootIndex];

            return(rOcc.RightMostSet.FirstOrDefault(t => t.SecondIndex > specifiedIndex));
        }
Пример #3
0
 internal List <IOccurrence> GetRightMostOccurrences(int depth, TreeId treeId, PreorderIndex rootIndex)
 {
     return(ContainsRootIndex(depth, treeId, rootIndex) ? this[depth][treeId][rootIndex].RightMostSet : null);
 }
Пример #4
0
 internal IOccurrence GetOccurrence(int depth, TreeId treeId, PreorderIndex rootIndex)
 {
     return(ContainsRootIndex(depth, treeId, rootIndex) ? this[depth][treeId][rootIndex].FirstOcc : null);
 }
Пример #5
0
 internal bool ContainsRootIndex(int depth, TreeId treeId, PreorderIndex rootIndex)
 {
     return(DepthOccSet.ContainsKey(depth) && (DepthOccSet[depth].ContainsRootIndex(treeId, rootIndex)));
 }
Пример #6
0
 internal bool ContainsRootIndex(TreeId treeId, PreorderIndex rootIndex)
 {
     return(ContainsTree(treeId) && TreeSet[treeId].ContainsRootIndex(rootIndex));
 }
 public RootOcc(TreeId treeId, Depth depth, PreorderIndex rootIndex)
 {
     this.treeId    = treeId;
     this.depth     = depth;
     this.rootIndex = rootIndex;
 }
Пример #8
0
 internal bool ContainsRootIndex(PreorderIndex rootIndex)
 {
     return(RootSet.ContainsKey(rootIndex));
 }