Can I add a routine to access the AvgLvlTree as an array? To make it a
better substitute to TFPList in objects which offer an indirect
interface to the internal list, such as TLazAccessibleObject.

My idea is defining:
Index zero = Tree.FindLowest
Indez Count-1= Tree.FindHighest

On each access store the last accessed node and if the next call wants
a node index=oldindex+1 or -1 then just use:

 Tree.FindSuccessor(Node)
 Tree.FindPrecessor(Node)

Because almost always I use the array access only to iterate in a loop.

Non-ordened access ofcourse would be slow because it would require a
loop till the index is found.

-- 
Felipe Monteiro de Carvalho

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to