Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 444 Vote(s) - 3.44 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tree Library for C

#1
I want to store a general tree in C using parent pointer approach (a node store pointer to its parent node only). Is there any standard library for this?

Thanks in advance
Reply

#2
I'm not quite sure, but when having trees of data it *might* be more handy to use C++ for that as it allows you to easily build hierarchies of objects which all have pointers to their parents and children.
Reply

#3
Google shows me to [GNU C Library][1]. Are you looking for something more?


[1]:

[To see links please register here]

Reply

#4
Have you tried [codesearch][1]?


[1]: http://www.google.com/codesearch?hl=en&a...s_r=lang:c
Reply

#5
There is a library called "libc": `man tsearch` :)
Reply

#6
I don't know what you mean by

> parent pointer approach (a node store pointer to its parent node only)

but if you by chance mean that nodes should store pointers to their data, instead of the data incorporating node info, then my [C language library of AVL trees][1] could be what you are looking for.


[1]:

[To see links please register here]

Reply

#7
How about [Ben Pfaff's libavl][1]?

Granted, you will need some time to read the excellent documentation, but if you seriously want to work with trees, then it's well worth each single hour.


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through