Advertisement

Implementing a graph data structure

Started by November 07, 2000 08:07 AM
13 comments, last by Floru 24 years, 2 months ago
There is no "graph" or "adjacency list" container in the STL. You have list, vector, map, set, and dequeue. You can implement it using std::list, or even std::map, but there''s not an out-of-the-box solution from STL.
Oh, well, someone should add one then. I will be honest in that I never use it, but I don''t particularly think that is a good practice. If that is all there is to it then no wonder I don''t use it.
Keys to success: Ability, ambition and opportunity.
Advertisement
Two words:

Cons Cells.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
I''ll bite. What''s a con cell?
quote: Original post by Stoffel

I'll bite. What's a con cell?


In answer to your question, I would imagine a con cell is place where convicts are held.

What I said was 'Cons Cells'. Now, at first glance, cons cells might not appear general enough to solve one's problems, but that would likely be becasue you are not changing your perspective on their use. They are the fundamental data structure of LISP, and are used heavily in symbolic processing, which essentially requires a graph data structure.

Here is one simple explanation.





Edited by - bishop_pass on November 9, 2000 11:05:52 AM
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.

This topic is closed to new replies.

Advertisement