[BGL] Bundled Properties and setS Edgelist container
I know that if I use a setS for the edgelist container for an adjacency_list class, each edge of my graph will only be added once as I build it. This functionality is very desirable for me, but I've found I can't seem to use it with the equally desirable Bundled Property Maps. Specifically, this line of code doesn't seem to work: (*g)[i].paper_id = atoi(row[0]); g is a pointer to my graph. The exact compiler error with g++ 4.1.1 is: error: invalid conversion from 'size_t' to 'void*' Is there anyway I can use these two features together? If not, I'm going to be very disappointed. If that's the case I'd advise making a large note of it in the bundled properties documentation as I wouldn't have bothered with bundled properties if I knew they carried this limitation. -- Sam Peterson peabody@freeshell.org peabodyenator@gmail.com
Hi Sam,
On 8/28/07, Sam Peterson
I know that if I use a setS for the edgelist container for an adjacency_list class, each edge of my graph will only be added once as I build it.
This functionality is very desirable for me, but I've found I can't seem to use it with the equally desirable Bundled Property Maps. Specifically, this line of code doesn't seem to work:
(*g)[i].paper_id = atoi(row[0]);
g is a pointer to my graph. The exact compiler error with g++ 4.1.1 is:
error: invalid conversion from 'size_t' to 'void*'
An example would be very helpful, as the following compiles fine for
me with boost 1.33.1 and g++ 4.1.2:
Cheers,
Stephan
#include <iostream>
#include
On 8/28/07, Stephan Diederich
typedef adjacency_list
-----------------------------------------------------, setS I think the issue only occurred when the edge list was changed to setS. You only did the vertex list. Jon
Hi Jon,
On 8/28/07, Jonathan Franklin
On 8/28/07, Stephan Diederich
wrote: typedef adjacency_list
-----------------------------------------------------, setS I think the issue only occurred when the edge list was changed to setS. You only did the vertex list.
Just rechecked, but I think I chose setS: (maybe bad formatting?)
typedef adjacency_list
On 8/28/07, Stephan Diederich
Just rechecked, but I think I chose setS: (maybe bad formatting?) typedef adjacency_list
Graph;
No, you chose setS for the vertex list, try this and see if it works for you:
typedef adjacency_list
On 8/28/07, Sam Peterson
On 8/28/07, Stephan Diederich
wrote: Just rechecked, but I think I chose setS: (maybe bad formatting?) typedef adjacency_list
Graph; No, you chose setS for the vertex list, try this and see if it works for you:
typedef adjacency_list
Graph;
This is inconsistent IMO:
template
On 8/28/07, Stephan Diederich
Just rechecked, but I think I chose setS: (maybe bad formatting?) typedef adjacency_list
Graph;
Sorry, my bad. I forgot that vertex/edge properties are specified in the reverse order from the edge/vertex list types. <sigh> Jon
participants (3)
-
Jonathan Franklin
-
Sam Peterson
-
Stephan Diederich