I thought I remembered something on the wiki about this and did a
search on it for acyclic. Didn't find what I was looking for but the
following pages suggest formats for DAGs:
http://www.jsoftware.com/jwiki/Essays/Text Formatting
http://www.jsoftware.com/jwiki/RogerHui/t

On Wed, Mar 21, 2012 at 12:17 PM, Alexander Mikhailov <avm...@yahoo.com> wrote:
>
>
> Hi,
>
>
> I need an implementation of a directed acyclic graph. Both nodes and links 
> should contain DAG user info, and 2 nodes may have 0 or more (acyclic) links 
> between them. What could be a good implementation in J? Having a node I need 
> to (efficiently) find both "following" and "preceding" nodes.
>
>
> So far the best I have is an array of items, each item having 3 boxes. Item 
> correspond to a node, first box contain node user info (actually, an integer 
> - index in the separate array of user node data), second box contains the 
> array of preceding nodes' indexes (integers, indexes in this same graph 
> array, and integers may repeat as a preceding node may be connected by more 
> than a single link) and the third box contains array of pairs "index of 
> following node - index of link's user data in a separate array". So, third 
> box contains N*2 integers, where N is the number of links, starting in this 
> node.
>
> Doesn't look like particularly J style. Do you have any suggestions?
>
> Thank you,
>
> Alexander
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to