Trees always have some context to them, so a completely generic approach for 
tree2array doesn't exist.  If you follow Raul and my recent discussion on 
parsing pythonish, you'll see a good structured array to tree function.  J is 
an outstanding language for working with tree data, with its boxed 
visualization, and parsing tools.

J provides some decent primitives for working with trees too:
L. L: S: {::

There could be more official support for updating tree cells (}:: -- but 
general sample code is on wiki somewhere), and an OOP approach to support 
Parent, Children, Leftsibbling, Rightsibbling type access and walking would be 
straightforward, but don't know of a sample implementation.

----- Original Message ----
From: Terrence Brannon <[EMAIL PROTECTED]>
To: General forum <[email protected]>
Sent: Friday, April 6, 2007 10:46:59 AM
Subject: [Jgeneral] Executive Overview of J - Arrays as the most viable data 
structure

I was sitting here in front of an Excel spreadsheet, thinking, "you
know this is an array" ... not too long ago I was looking at a
database table and thinking the same thing.

HOWEVER. isn't a tree the most general data structure? You can make
lists out of trees and make arrays out of lists. Therefore the most
fundamental and broadly applicable data structure is a tree and not an
array.

Any feedback on why J is an array processing language and how it might
handle tree/hierarchical data is appreciated.

And how good is J with infinite data structures/streams?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to