
On Saturday, 27. November 2010 12:19:47 Carmine Paolino wrote:
On 27 Nov 2010, at 11:50, Cedric Laczny wrote:
Hi,
unfortunately, I can't help you directly with that one as I have no MPI installed. I compared your code to one of my attempts to work with brandes_betweenness_centrality and I could not find anything that would make me say "Change this, and it should work". However, the documentation of brandes_betweenness_centrality says for the centrality_map: The value type of this property map should be a floating-point or rational type. I don't know if you already tried that out.
Yes, it's in the second example: https://gist.github.com/f02f18f30f0eef146a58#file_betweenness_named_graph2 .cpp
When I eliminate the MPI-parts and simply define adjacency_list
, it compiles just fine. Also the vector<int> seems not to be a problem, although it might be for your results later on. What is interesting me though is, why you define an internal_vertex_name, when you already have it as a bundled property?
Those two files are just examples to reproduce the problem we have in the actual code. `internal_vertex_name` is independent from bundled properties: you can use it either with bundled properties or with a Vertex or Edge structure and it allows us to find a vertex by name and to automatically add it if that vertex isn't already in the graph. See the docs here: http://www.boost.org/doc/libs/release/libs/graph_parallel/doc/html/distrib uted_adjacency_list.html#named-vertices
Thank you very much for that information.
The Vertex structure, by the way, give us more flexibility than the bundled properties and also results in more maintainable code.
This is not intended to be picky. I simply want to clarify this for me. Because AFAIK, using "external" classes or structs to represent properties of vertices or edges is the concept of bundled properties (just as you do in the examples). Using e.g. vertex_index_t or such (e.g. as defined in properties.hpp) follows the concept of internal properties?! Nevertheless, I agree with you absolutely that using structs or classes to represent the properties is far more flexible and increases the maintainability of the code. Best, Cedric
Carmine Paolino
Best,
Cedric
On Saturday, 27. November 2010 11:07:05 Carmine Paolino wrote:
Hello,
I'm trying to use `brandes_betweenness_centrality` with named vertexes but so far I haven't managed to get it working.
These are the two approaches I tried:
1. passing an iterator_property_map on the vertex_index: https://gist.github.com/f02f18f30f0eef146a58#file_betweenness_named_grap h. cpp
2. passing a property_map on a float inside the vertex: https://gist.github.com/f02f18f30f0eef146a58#file_betweenness_named_grap h2 .cpp
And these are the compile logs for the first file: clang: https://gist.github.com/f02f18f30f0eef146a58#file_compile_clang.log gcc:https://gist.github.com/f02f18f30f0eef146a58#file_compile_gcc.log
and the second file: clang: https://gist.github.com/f02f18f30f0eef146a58#file_compile_clang2.log gcc: https://gist.github.com/f02f18f30f0eef146a58#file_compile_gcc2.log
What I'm doing wrong?
Thanks in advance _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users