[fpc-pascal] Tree structure

Sven Barth pascaldragon at googlemail.com
Tue Feb 12 19:38:07 CET 2013


On 12.02.2013 16:44, Leonardo M. Ramé wrote:
>> ________________________________
>> From: Michael Van Canneyt <michael at freepascal.org>
>> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
>> Sent: Tuesday, February 12, 2013 12:36 PM
>> Subject: Re: [fpc-pascal] Tree structure
>>
>>
>>
>> On Tue, 12 Feb 2013, Torsten Bonde Christiansen wrote:
>>
>>> On 2013-02-12 16:13, Leonardo M. Ramé wrote:
>>>         Hi, I would like to know if there's a standard tree structure where each node is a TObject. With "standard" I mean, in a standard package, like
>>>         fcl-base.
>>>
>>>
>>> Leonardo M. Ramé
>>> http://leonardorame.blogspot.com
>>>
>>>
>>> FCL_base does have one: avl_tree
>>
>> Does not allow multiple children, only left/right, no ?
>>
>> Michael.
>
>
> Isn't that a balanced binary tree? I'm looking for a simple tree structure (http://en.wikipedia.org/wiki/Tree_%28data_structure%29)

You could take a look at $fpcdir/packages/fcl-stl/gtree.pp (only in 2.7.1).

Regards,
Sven




More information about the fpc-pascal mailing list