Hello, Can I reiterate my question about subgraphes: is there a way to delete unneeded children of the root subgraph? If I pass the root subgraph object to an algorithm, will it contain all the information about the subgraphes? If there is no way to delete unneeded children, how can I safely pass to an algorithm a set of subgraphes of the root graph ?? Also, are the bundled properties for subgraphes implemented yet in CVS ? Thank you, Jean-Noël
On Apr 15, 2005, at 6:56 AM, Elvanör wrote:
Hello,
Can I reiterate my question about subgraphes: is there a way to delete unneeded children of the root subgraph?
No :(
If I pass the root subgraph object to an algorithm, will it contain all the information about the subgraphes?
Yes
If there is no way to delete unneeded children, how can I safely pass to an algorithm a set of subgraphes of the root graph ??
I don't have a good answer for this.
Also, are the bundled properties for subgraphes implemented yet in CVS ?
Yes, as of about 2 minutes ago :) Please tell me if you run into any problems. Doug
Also, are the bundled properties for subgraphes implemented yet in CVS ?
Yes, as of about 2 minutes ago :) Please tell me if you run into any problems.
I am currently looking... I think that the fact that you can obtain the graph type from a subgraph adaptor (via the graph_type trait) should be documented. I searched on the documentation, didn't find anything, then looked at the source and found graph_type. Thanks Jean-Noël
Hello,
Also, are the bundled properties for subgraphes implemented yet in CVS ?
Yes, as of about 2 minutes ago :) Please tell me if you run into any problems.
Actually, yes, I ran into a problem using the CVS. I don't think it is related to subgraph and/or bundled properties, though, but I am not sure as this seems to be something that is really a deep implementation problem. Here is the error: In file included from /Users/elvanor/Library/include/boost/type_traits/extent.hpp:14, from /Users/elvanor/Library/include/boost/type_traits.hpp:61, from /Users/elvanor/Library/include/boost/detail/numeric_traits.hpp:64, from /Users/elvanor/Library/include/boost/iterator/counting_iterator.hpp:9, from /Users/elvanor/Library/include/boost/pending/integer_range.hpp:14, from /Users/elvanor/Library/include/boost/graph/detail/adjacency_list.hpp: 18, from /Users/elvanor/Library/include/boost/graph/adjacency_list.hpp:281, from /Users/elvanor/Development/probabilisticgraphicalmodels/src/ GraphAlgorithms.h:4, from /Users/elvanor/Development/probabilisticgraphicalmodels/src/ GraphAlgorithms.cc:7: /Users/elvanor/Library/include/boost/type_traits/detail/ size_t_trait_def.hpp:33:1: "BOOST_TT_AUX_SIZE_T_TRAIT_DEF1" redefined In file included from /Users/elvanor/Library/include/boost/type_traits/rank.hpp:14, from /Users/elvanor/Library/include/boost/type_traits.hpp:60, from /Users/elvanor/Library/include/boost/detail/numeric_traits.hpp:64, from /Users/elvanor/Library/include/boost/iterator/counting_iterator.hpp:9, from /Users/elvanor/Library/include/boost/pending/integer_range.hpp:14, from /Users/elvanor/Library/include/boost/graph/detail/adjacency_list.hpp: 18, from /Users/elvanor/Library/include/boost/graph/adjacency_list.hpp:281, from /Users/elvanor/Development/probabilisticgraphicalmodels/src/ GraphAlgorithms.h:4, from /Users/elvanor/Development/probabilisticgraphicalmodels/src/ GraphAlgorithms.cc:7: /Users/elvanor/Library/include/boost/type_traits/detail/ size_t_trait_def.hpp:33:1: this is the location of the previous definition As I am unsure of how I should/could fix that, can you tell me when a fix will be provided ? (hopefully shortly because this seems to be a showstopper). Thanks Elvanor (ps: I guess I have to get used to these errors, now that I have been forced to upgrade to CVS...) ps2: as a sidenote, there doesn't seem to be any triangulation algorithm implemented for BGL... Is that hard to implement? This really seems to be missing...
On Apr 15, 2005, at 3:20 PM, Elvanör wrote:
Hello,
Also, are the bundled properties for subgraphes implemented yet in CVS ?
Yes, as of about 2 minutes ago :) Please tell me if you run into any problems.
Actually, yes, I ran into a problem using the CVS. I don't think it is related to subgraph and/or bundled properties, though, but I am not sure as this seems to be something that is really a deep implementation problem. [snip] As I am unsure of how I should/could fix that, can you tell me when a fix will be provided ? (hopefully shortly because this seems to be a showstopper).
I suggest running "cvs update" again. I'm not seeing this problem, so it has most likely been fixed.
(ps: I guess I have to get used to these errors, now that I have been forced to upgrade to CVS...)
We can't do much about this. Even providing hotfixes as patches requires a lot of effort, and we can't provide any guarantees about the development version of Boost in CVS.
ps2: as a sidenote, there doesn't seem to be any triangulation algorithm implemented for BGL... Is that hard to implement? This really seems to be missing.
There are hundreds of graph algorithms that could fall into that category :) We don't have any triangulation algorithms, but would certainly welcome implementations. Doug
Hi, I am running into problems using bundled properties and the newly implemented subgraph for them. In my experience, it seems they are working correctly with the root subgraph, but they don't translate correctly to the children. The code compiles, meaning there is the interface, but I get segfaults at runtime and I think they are related to that problem, for exemple: void tree_gibbs_sampler(Graph & g, unsigned int max_steps, unsigned int burnoff) { typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; typedef typename graph_traits<Graph>::adjacency_iterator AdjacencyIterator; typedef typename graph_traits<Graph>::vertex_descriptor VertexDescriptor; typedef typename graph_traits<Graph>::edge_descriptor EdgeDescriptor; AdjacencyIterator w,w_end; VertexIterator v, v_end; VertexDescriptor u; subgraph <Graph> subgraph_g; copy_graph(g, subgraph_g); copy_graph(g, f); cout << g[0] << endl; u = vertex(0,subgraph_g); cout << subgraph_g[u] << endl; // here the last two line produce the same numbers... // here I do something to the root subgraph and produce childrens... for ( tie(current_tree, current_tree_end) = subgraph_g.children(); current_tree != current_tree_end; ++current_tree) { for (tie(v,v_end) = vertices (*current_tree); v!= v_end; ++v) { cout << (*current_tree)[*v] << endl; } } // The last for loop produces strange results, the bundled properties (here it is just adress to pointers) are not at all consistent anymore... (with the ones in the original graph or even root subgraph) So I think there is a problem with the current implementation. Jean-Noël Rivasseau
On Apr 17, 2005, at 5:13 PM, Elvanör wrote:
Hi,
I am running into problems using bundled properties and the newly implemented subgraph for them.
In my experience, it seems they are working correctly with the root subgraph, but they don't translate correctly to the children. The code compiles, meaning there is the interface, but I get segfaults at runtime and I think they are related to that problem, for exemple: [snip]
So I think there is a problem with the current implementation.
Yep, there is. The code now properly follows what get() and put() do for subgraphs. Let's hope it solves the problem you're seeing. Doug
participants (2)
-
Douglas Gregor
-
Elvanör