-
December 1st, 2008, 12:20 AM
#1
how to construct directed graph in c++
Hi all,
I need to construct a directed graph in c++. I need to add keywords as nodes and represent phrases (of words) with the edges. But I dont know what data structures to use and how I can implement this.
Can anyone please help me or give any pointers to available graph libraries?
Thanks
-
December 1st, 2008, 12:48 AM
#2
Re: how to construct directed graph in c++
The 2 most common data structures used to represent graphs are Adjacency Matrix and Adjacency List.
Each has it's own upsides and downsides (in terms of operations complexity and space (memory) complexity), but both are very easy to implement.
There are numerous libraries that include a graph class.
One of them that I can think of immediately is Boost. Search the web - you'll find plenty of resources by yourself.
Regards,
Zachm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|