Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Progress with SearchTree class

<< < (2/5) > >>


--- Quote from: rickg22 on December 20, 2005, 04:55:48 pm ---Yes, it's by design. Edges (words) are only split when needed, to. Notice that there is no node with only one child. This is what allows the path compression and saves space in memory :)

Each node has a list of the items and their corresponding depths. In this case, "psychiatrists" has an item with depth 12 for "psychiatrist", and another with depth 13 for "psychiatrists". When a node is split, the items are recalculated so they belong to the right node (at least in theory, i haven't checked if that one works :P )

--- End quote ---

Ah ok then, but that wasn't shown in the tree. Maybe you could append something like "[12, 13]" to the tree output for those nodes to show that?
Well it doesn't really matter as it's debug output, but that way you could check if it works at least.

I'll debug in an easier way: associating the strings with themselves. If a string doesn't match, then something is wrong. :)

Neat searching. Have you tested searching?

Adding a node implies searching for it, so yes, it's definitely tested ;-)
In fact, I realized some of the inserts weren't working right because there was a fault in the search.

Very neat. This is for the code completion right?


[0] Message Index

[#] Next page

[*] Previous page

Go to full version