Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to migrate VFP prog to C/S ?
Message
From
24/03/1998 17:22:09
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00085402
Message ID:
00086840
Views:
42
>>>With a binary search, there will be approximatively 27 search = 27 network access of 10 bytes = 270 bytes !!
>>
>>Fox will be even more efficient. Fox uses b-trees, not binary trees. B-trees have multiple values per node and are self-balancing. Simple binary trees have one value per node and are not self-balancing (the worst case is when you add presorted data - you end up with a singly linked list).
>
>What Emmanuel is talking about is the search method computational complexity (using the index). The value (27 accesses) represent the worst case scenario. BTW, binary trees, by definition, have two leaves per node, hence the name, and are not the same as linked lists, which have only one.

reread what I said.

binary tree worst case:

node1.right->node2.right->node3.right->node4.right->node5.right

If you don't have any nodes on the left branch you have created a linked list. The reference was made because of the self-balancing nature of b-trees. Simple binary trees are not self-balancing (red-black trees, etc. are self-balancing).

I believe he was addressing index efficiency as measured by the number of comparisons required to find a matching record (or fail) - not computational complexity.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform