Recent

Author Topic: Tree data structure  (Read 4181 times)

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Tree data structure
« on: August 16, 2013, 03:28:30 pm »
I have been occupied with a pascal program to parse a tree in NEWICK format to a pascal data structure.
On the internet I could not find any link on howto do this.
So if anybody is interested take a look at my blog on http://logical-connections.com
In this blog the parsing of the Newick format to a "pascal friendly" :D data structure is explained.
« Last Edit: August 16, 2013, 03:31:25 pm by Middlecope »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Tree data structure
« Reply #1 on: August 16, 2013, 05:27:56 pm »
I added generic k-ary tree data structure with simple traversal method (breadth first and depth first) using callback a couple of months ago. Probably you could make a good use of it (or better, improve with more traversal methods or whatever that can be done in general with a tree data structure).

P.S.: Despite the name, actually you can use the data structure as graph, just don't use the two traversal methods above as they don't checked visited nodes so it may cause garden path problem or leads to application crash.

dtamadeEx

  • New Member
  • *
  • Posts: 17
Re: Tree data structure
« Reply #2 on: September 11, 2018, 09:49:51 pm »
I added generic k-ary tree data structure with simple traversal method (breadth first and depth first) using callback a couple of months ago. Probably you could make a good use of it (or better, improve with more traversal methods or whatever that can be done in general with a tree data structure).

P.S.: Despite the name, actually you can use the data structure as graph, just don't use the two traversal methods above as they don't checked visited nodes so it may cause garden path problem or leads to application crash.

good!

 

TinyPortal © 2005-2018