in reply to generating a Tree from Array and find the best way

That's a bit more than I want to bite off right now. However, I recently saw another monk here refer to the module Graph::Easy::Parser. You may want to take a look at it. It will help you turn your list of edges into a graph. I don't know about filling in missing nodes or not, but I wouldn't be surprised if some tools for that are in there as well.

Once you start looking into the Graph modules, you'll see that they have ways to create HTML, ASCII, and many other useful output formats. Try going to www.cpan.org and getting some of the Graph modules and work through the examples. Then you'll be able to ask smaller questions......8^)

Hope this helps a little...

--roboticus

  • Comment on Re: generating a Tree from Array and find the best way

Replies are listed 'Best First'.
Re^2: generating a Tree from Array and find the best way
by ultibuzz (Monk) on Apr 06, 2006 at 21:55 UTC

    thx for the hint im now reading the Graph::Easy::Parser, and maybe my question is somkind of challenge for someone who is borred at the moment ;D


    well the Graph thing looks good i made somthing quick and dirty

    now i just need to do it automaticly because a few things needs to be clear when you have more then one connection it depends on the order of notes if its going trough or not

    for exp if you switch the last 2 lines in the code it will generate an compiler error, so i need to figure out how to do it manually , but im in bed now in 4 h i need to get to work

    thx again for the hint
    UPDATE i get that this is maybe to complex for this module because lots of connections are messed up and as an html file it spit out can only place 22 nodes out of 43 , but i will test tomorrow more

    UPDATE 2so here is some more optimised version im atm writing som script that check all possible transitions and will link those who are same if the second pair is reversed as a double connection <-> and not as -> this save alot of lines in the tree, i find some eq testing for my second problem and will look this up but im not sure if i get it ;D