implementing a generic tree

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher

    implementing a generic tree

    I hate to start from scratch as the need for it isn't as great as the
    work it would take. But, it sure would be nice if I had some data
    structure that represented a generic tree.

    I heard using boost's graph library might be an option. Any resources
    on doing so to implement a tree around? Or any suggestions on an
    alternative?
  • Martin York

    #2
    Re: implementing a generic tree

    On Apr 2, 2:16 pm, Christopher <cp...@austin.r r.comwrote:
    I hate to start from scratch as the need for it isn't as great as the
    work it would take. But, it sure would be nice if I had some data
    structure that represented a generic tree.
    >
    I heard using boost's graph library might be an option. Any resources
    on doing so to implement a tree around? Or any suggestions on an
    alternative?

    Do you really want a tree.
    Or do you just want the access characteristics of a tree.

    If the latter than you can store your data in std::map<or std::set<>
    depending on your usage model. As the standard garantees that access
    to these containers have certain characteristics (that happen to be
    very similar to the access characteristics of a tree). Just a thought.

    If you give us more detail about what you need to do then we can give
    some more advice.

    Comment

    Working...