Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to migrate VFP prog to C/S ?
Message
De
24/03/1998 17:22:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00085402
Message ID:
00086840
Vues:
43
>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform