Exemple #1
0
        private BNode <T, TKey> BTreeSearch(int CrawlerPointer, TKey Key, out int Pointer)
        {
            BNode <T, TKey> Crawler = BNode <T, TKey> .DiskRead(File, Degree, CrawlerPointer, TFactory, TKeyFactory);

            Pointer = Crawler.PrecisePointer(Key);
            if (Pointer != -1)
            {
                return(Crawler);
            }
            else
            {
                if (Crawler.Leaf)
                {
                    return(null);
                }
                else
                {
                    int FirstPointerOfNodeContaining = Crawler.FirstPointerOfNodeContaining(Key);
                    return(BTreeSearch(Crawler.ChildrenPointers[FirstPointerOfNodeContaining], Key, out Pointer));
                }
            }
        }