You might find useful the kind of integer index tree I'd mentioned in the
earlier discussion: it's a vector of integers where each element is the
index of the parent node but with _1 for the root's parent.  I use this for
modeling directory trees and it works well for that.  Also, what I'm
usually doing is looking up an item and locating its parent, or joining
sub-trees into a larger tree: this structure is good (simple to code and
fast) for these sorts of things.  The process of breaking out sub-trees is
more cumbersome than adding them in with this structure, so it depends on
what you're mostly doing.

I've started a page on the j-wiki -
http://www.jsoftware.com/jwiki/DevonMcCormick/Trees - to explain this
structure - it's still in a preliminary state.



On Fri, Nov 16, 2012 at 1:01 PM, Alexander Mikhailov <[email protected]>wrote:

> > Note that Context Free Grammars tend to be ambiguous, in traditional
> > programming environments we typically want a Parsing Expression
> > Grammar.  And we probably need "cloud sized resources" to adequately
> > tackle natural language parsing.
>
> I have only little familiarity with PEGs; I'm not sure what is the set
> of recognizable languages for PEG, comparing to LL/LR/generalized LR.
> Can you recommend good resources on that?
>
> > These are related issues -- we could imagine a transforming operation
> > in J (analogous to f.) which lifts unnecessary conditionals out of
> > loops, to make serial processing more efficient.  [And we could also
> > imagine a transforming operation for the purpose of deploying
> > something written in J into a GPU, or whatever.]   We do not currently
> > have that, but it's doable -- the trick to getting started would be to
> > start small.
>
> That would be very interesting - such a transforming operation...
>
> > There are also many different kinds of trees.
>
> I need only very basics - a tree is many elements, each having exactly
> one parent, with singular exception of the root.
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to