Re: Why does not have a standard Tree Structure in Pharo? ( stepharo )

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Why does not have a standard Tree Structure in Pharo? ( stepharo )

Bing Liang
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Why does not have a standard Tree Structure in Pharo? ( stepharo )

stepharo
Ok I see.
Indeed. You are right.
If you want to help proposing one then we can improve the situation together.

Hi Stef,
I mean, Tree structure is a standard Data Structure including store, edit and visit. (endorder,preorder).
tree as a struture has a set of protocol for operations. 
TreeStruture is a class of Dolphin ( it has become an opensource project now ).
TreeStructure implements the <treeModel> protocol and organises a collection of objects into a tree like data structure.
You can organise the objects with TreeStructure  when need a tree.  Only one class for all applications. I think.

But in Pharo , there is no such a standard tree structure. so people makes theri owns. 
e.g.
FTDataSource subclass: #FTTreeDataSource
MorphTreeModel subclass: #SpecTreeModel
Model subclass: #MorphTreeModel
Dictionary subclass: #KeyedTree  (not real tree)

these implements mix tree structure and other attributes. 
if we have a standard tree struture, so we can seperate them, make the system become clean and simple.

Best Regards!

Liang


 


Reply | Threaded
Open this post in threaded view
|

Re: Why does not have a standard Tree Structure in Pharo? ( stepharo )

EstebanLM
But please notice that FTTreeDataSource is not a “Tree Structure”, and it is not its purpose… FTTreeDataSource is a data source :) a provider of data for visualisation purposes, in a tree way. 
This is very different than been a tree structure… for example, FTTreeDataSource could *contain* a tree structure… or not, it could just calculate children as demanded (for example is browsing a file system), etc.

Esteban


On 23 Apr 2016, at 11:10, stepharo <[hidden email]> wrote:

Ok I see.
Indeed. You are right.
If you want to help proposing one then we can improve the situation together.

Hi Stef,
I mean, Tree structure is a standard Data Structure including store, edit and visit. (endorder,preorder).
tree as a struture has a set of protocol for operations. 
TreeStruture is a class of Dolphin ( it has become an opensource project now ).
TreeStructure implements the <treeModel> protocol and organises a collection of objects into a tree like data structure.
You can organise the objects with TreeStructure  when need a tree.  Only one class for all applications. I think.

But in Pharo , there is no such a standard tree structure. so people makes theri owns. 
e.g.
FTDataSource subclass: #FTTreeDataSource
MorphTreeModel subclass: #SpecTreeModel
Model subclass: #MorphTreeModel
Dictionary subclass: #KeyedTree  (not real tree)

these implements mix tree structure and other attributes. 
if we have a standard tree struture, so we can seperate them, make the system become clean and simple.

Best Regards!

Liang


 


Reply | Threaded
Open this post in threaded view
|

Re: Why does not have a standard Tree Structure in Pharo? ( stepharo )

philippeback

On Sat, Apr 23, 2016 at 11:35 AM, Esteban Lorenzano <[hidden email]> wrote:
But please notice that FTTreeDataSource is not a “Tree Structure”, and it is not its purpose… FTTreeDataSource is a data source :) a provider of data for visualisation purposes, in a tree way. 
This is very different than been a tree structure… for example, FTTreeDataSource could *contain* a tree structure… or not, it could just calculate children as demanded (for example is browsing a file system), etc.

Esteban


On 23 Apr 2016, at 11:10, stepharo <[hidden email]> wrote:

Ok I see.
Indeed. You are right.
If you want to help proposing one then we can improve the situation together.

Hi Stef,
I mean, Tree structure is a standard Data Structure including store, edit and visit. (endorder,preorder).
tree as a struture has a set of protocol for operations. 
TreeStruture is a class of Dolphin ( it has become an opensource project now ).
TreeStructure implements the <treeModel> protocol and organises a collection of objects into a tree like data structure.
You can organise the objects with TreeStructure  when need a tree.  Only one class for all applications. I think.

But in Pharo , there is no such a standard tree structure. so people makes theri owns. 
e.g.
FTDataSource subclass: #FTTreeDataSource
MorphTreeModel subclass: #SpecTreeModel
Model subclass: #MorphTreeModel
Dictionary subclass: #KeyedTree  (not real tree)

these implements mix tree structure and other attributes. 
if we have a standard tree struture, so we can seperate them, make the system become clean and simple.

Best Regards!

Liang


 



Reply | Threaded
Open this post in threaded view
|

Re: Why does not have a standard Tree Structure in Pharo? ( stepharo )

Pierce Ng-3
On Sat, Apr 23, 2016 at 12:03:03PM +0200, [hidden email] wrote:
> There are BTrees (I made a copy in my Smalltalkhub):
> http://www.smalltalkhub.com/#!/~philippeback/Trees
> http://stackoverflow.com/questions/6917310/tree-implementations-in-smalltalk

Also http://smalltalkhub.com/#!/~hernan/Trees, a port of Bruce Samuelson's
generalized tree implementation from the early 90s.

Pierce