Hi
I am having compilation error when calling copy_graph. The compilation error is regarding vertex_all for default copy of vertices. Where can I find info regarding this property and how to resolve the issue?
What graph type are you using? If it is custom, you might have an easier time passing in your own vertex and edge copying functions, which avoids the need to have vertex_all or edge_all properties. See <URL:http://www.boost.org/doc/libs/1_49_0/libs/graph/doc/copy_graph.html> for information on those parameters.
-- Jeremiah Willcock
I don't understand what is custom graph but my graph definition is: typedef boost::adjacency_list<boost::listS //container class of the edges. ,boost::vecS ,boost::bidirectionalS ,MCVertexProp ,boost::property<boost::edge_weight_t,MCEdgeWeight>s ,MCGraphProp> MCBaseGraph; do i need to declare vertex_all as property and if so what is its type?
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
> Hi > > I am having compilation error when calling copy_graph. > The compilation error is regarding vertex_all for default copy of vertices. > Where can I find info regarding this property and how to resolve the issue?
What graph type are you using? If it is custom, you might have an easier time passing in your own vertex and edge copying functions, which avoids the need to have vertex_all or edge_all properties. See <URL:http://www.boost.org/doc/libs/1_49_0/libs/graph/doc/copy_graph.html> for information on those parameters.
-- Jeremiah Willcock
I don't understand what is custom graph but my graph definition is:
typedef boost::adjacency_list<boost::listS //container class of the edges. ,boost::vecS ,boost::bidirectionalS ,MCVertexProp ,boost::property<boost::edge_weight_t,MCEdgeWeight>s ,MCGraphProp> MCBaseGraph;
do i need to declare vertex_all as property and if so what is its type?
The examples seem to suggest that vertex_all should be predefined, but I may have broken that. Could you please send your full error message? -- Jeremiah Willcock
1>------ Build started: Project: VerifyStabilization, Configuration: Debug Win32 ------ 1>Build started 05/06/2012 18:36:08. 1>ClCompile: 1> VerifyStabilizaiton.cpp 1>c:\users\benshabt\projects\thesis\thesis\code\thirdparty\include\boost\graph\copy.hpp(82): error C2664: 'boost::vec_adj_list_vertex_all_properties_map<Graph,GraphPtr,Property,PropertyRef>::vec_adj_list_vertex_all_properties_map(GraphPtr)' : cannot convert parameter 1 from 'boost::vec_adj_list_vertex_all_properties_map<Graph,GraphPtr,Property,PropertyRef>' to 'const MCGraph *' 1> with 1> [ 1> Graph=MCGraph, 1> GraphPtr=const MCGraph *, 1> Property=boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>>, 1> PropertyRef=const boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>> & 1> ] 1> and 1> [ 1> Graph=boost::adjacency_list<boost::listS,boost::vecS,boost::bidirectionalS,MCVertexProp,boost::property<boost::edge_weight_t,MCEdgeWeight>,MCGraphProp>, 1> GraphPtr=const boost::adjacency_list<boost::listS,boost::vecS,boost::bidirectionalS,MCVertexProp,boost::property<boost::edge_weight_t,MCEdgeWeight>,MCGraphProp> *, 1> Property=boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>>, 1> PropertyRef=const boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>> & 1> ] 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1> c:\users\benshabt\projects\thesis\thesis\code\thirdparty\include\boost\graph\copy.hpp(80) : while compiling class template member function 'boost::detail::vertex_copier<Graph1,Graph2>::vertex_copier(const Graph1 &,Graph2 &)' 1> with 1> [ 1> Graph1=MCGraph, 1> Graph2=MCGraph 1> ] 1> c:\users\benshabt\projects\thesis\thesis\code\thirdparty\include\boost\graph\copy.hpp(304) : see reference to class template instantiation 'boost::detail::vertex_copier<Graph1,Graph2>' being compiled 1> with 1> [ 1> Graph1=MCGraph, 1> Graph2=MCGraph 1> ] 1> c:\users\benshabt\projects\thesis\thesis\code\verifiers\verifystabilization\verifystabilizaiton.cpp(18) : see reference to function template instantiation 'void boost::copy_graph<T,MCGraph>(const VertexListGraph &,MutableGraph &)' being compiled 1> with 1> [ 1> T=MCGraph, 1> VertexListGraph=MCGraph, 1> MutableGraph=MCGraph 1> ] 1>c:\users\benshabt\projects\thesis\thesis\code\thirdparty\include\boost\graph\copy.hpp(82): error C2664: 'boost::vec_adj_list_vertex_all_properties_map<Graph,GraphPtr,Property,PropertyRef>::vec_adj_list_vertex_all_properties_map(GraphPtr)' : cannot convert parameter 1 from 'boost::vec_adj_list_vertex_all_properties_map<Graph,GraphPtr,Property,PropertyRef>' to 'MCGraph *' 1> with 1> [ 1> Graph=MCGraph, 1> GraphPtr=MCGraph *, 1> Property=boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>>, 1> PropertyRef=boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>> & 1> ] 1> and 1> [ 1> Graph=boost::adjacency_list<boost::listS,boost::vecS,boost::bidirectionalS,MCVertexProp,boost::property<boost::edge_weight_t,MCEdgeWeight>,MCGraphProp>, 1> GraphPtr=boost::adjacency_list<boost::listS,boost::vecS,boost::bidirectionalS,MCVertexProp,boost::property<boost::edge_weight_t,MCEdgeWeight>,MCGraphProp> *, 1> Property=boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>>, 1> PropertyRef=boost::property<boost::vertex_name_t,ParamName,boost::property<boost::vertex_FPParamIndex_t,unsigned int>> & 1> ] 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:25.04 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== On Tue, Jun 5, 2012 at 6:09 PM, Jeremiah Willcock <jewillco@osl.iu.edu>wrote:
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
> Hi
> > I am having compilation error when calling copy_graph. > The compilation error is regarding vertex_all for default copy of vertices. > Where can I find info regarding this property and how to resolve the issue?
What graph type are you using? If it is custom, you might have an easier time passing in your own vertex and edge copying functions, which avoids the need to have vertex_all or edge_all properties. See <URL:http://www.boost.org/doc/**libs/1_49_0/libs/graph/doc/** copy_graph.html<http://www.boost.org/doc/libs/1_49_0/libs/graph/doc/copy_graph.html>
for information on those parameters.
-- Jeremiah Willcock
I don't understand what is custom graph but my graph definition is:
typedef boost::adjacency_list<**boost::listS
//container class of the **edges. ,boost::vecS
,boost::bidirectionalS ,MCVertexProp
,boost::property<boost::edge_**weight_t,MCEdgeWeight>s ,MCGraphProp> MCBaseGraph;
do i need to declare vertex_all as property and if so what is its type?
The examples seem to suggest that vertex_all should be predefined, but I may have broken that. Could you please send your full error message?
-- Jeremiah Willcock
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote: (snip) This looks like vertex_all breaks with bundled properties. Could you please try with the trunk version of Boost? I did a lot of refactoring of the property implementation and it might have fixed this. -- Jeremiah Willcock
This is problematic since the current project is using boost 1.47 (its medium size project) and moving it a version takes a couple of days. i can supply you with details like what are the exact definition of the graph but i am afraid moving it a version especially to trunk. On Tue, Jun 5, 2012 at 6:39 PM, Jeremiah Willcock <jewillco@osl.iu.edu>wrote:
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
(snip)
This looks like vertex_all breaks with bundled properties. Could you please try with the trunk version of Boost? I did a lot of refactoring of the property implementation and it might have fixed this.
-- Jeremiah Willcock
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
This is problematic since the current project is using boost 1.47 (its medium size project) and moving it a version takes a couple of days. i can supply you with details like what are the exact definition of the graph but i am afraid moving it a version especially to trunk.
I understand that -- can you just try using the trunk as an experiment, or is that hard to convert to as well? Writing a patch for this bug for an old version of Boost is difficult because of how complicated the code is; the refactoring simplified it a lot and would make the bug easier to fix if the refactoring itself didn't fix it. -- Jeremiah Willcock
Is there a nightly build or do i need to get it from svn? in case this is contained in the graph library you can send me the files and i will try to compile it with them. On Tue, Jun 5, 2012 at 6:51 PM, Jeremiah Willcock <jewillco@osl.iu.edu>wrote:
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
This is problematic since the current project is using boost 1.47 (its
medium size project) and moving it a version takes a couple of days. i can supply you with details like what are the exact definition of the graph but i am afraid moving it a version especially to trunk.
I understand that -- can you just try using the trunk as an experiment, or is that hard to convert to as well? Writing a patch for this bug for an old version of Boost is difficult because of how complicated the code is; the refactoring simplified it a lot and would make the bug easier to fix if the refactoring itself didn't fix it.
-- Jeremiah Willcock
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
Is there a nightly build or do i need to get it from svn?in case this is contained in the graph library you can send me the files and i will try to compile it with them.
I don't see any nightly builds, so it looks like you might need to get them from SVN. There are many files that changed, so I can't really send you all of them. Some of the changes (after the refactoring) also depend on Type Traits Introspection, which also isn't in any releases. I would just try what's in SVN. If that's not practical or you decide not to update your project right now, I can give some ideas for workarounds. -- Jeremiah Willcock
We can do them both. Let me know of workarounds and i will try to update to check if it was resolved (so you will get a chance to fix it in case it wasn't :-) ) On Tue, Jun 5, 2012 at 7:23 PM, Jeremiah Willcock <jewillco@osl.iu.edu>wrote:
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
Is there a nightly build or do i need to get it from svn?in case this is
contained in the graph library you can send me the files and i will try to compile it with them.
I don't see any nightly builds, so it looks like you might need to get them from SVN. There are many files that changed, so I can't really send you all of them. Some of the changes (after the refactoring) also depend on Type Traits Introspection, which also isn't in any releases. I would just try what's in SVN. If that's not practical or you decide not to update your project right now, I can give some ideas for workarounds.
-- Jeremiah Willcock
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
We can do them both.Let me know of workarounds and i will try to update to check if it was resolved (so you will get a chance to fix it in case it wasn't :-) )
OK. I think you basically have two workarounds: 1. Use a custom copy function that copies your bundled property. This is probably simple, and it is documented how to do it. It is also a localized change; it only affects your calls to copy_graph. 2. Change to using a non-bundled property and keep using vertex_all. This will require a lot of changes throughout your code base, but avoids needing to deal with the copy problem at all. -- Jeremiah Willcock
On Tue, Jun 5, 2012 at 7:23 PM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote: On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
Is there a nightly build or do i need to get it from svn?in case this is contained in the graph library you can send me the files and i will try to compile it with them.
I don't see any nightly builds, so it looks like you might need to get them from SVN. There are many files that changed, so I can't really send you all of them. Some of the changes (after the refactoring) also depend on Type Traits Introspection, which also isn't in any releases. I would just try what's in SVN. If that's not practical or you decide not to update your project right now, I can give some ideas for workarounds.
-- Jeremiah Willcock
Can you give an example of non bundled properties? are they properties i created using the BOOST_INSTALL ? On Tue, Jun 5, 2012 at 7:27 PM, Jeremiah Willcock <jewillco@osl.iu.edu>wrote:
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
We can do them both.Let me know of workarounds and i will try to update
to check if it was resolved (so you will get a chance to fix it in case it wasn't :-) )
OK. I think you basically have two workarounds:
1. Use a custom copy function that copies your bundled property. This is probably simple, and it is documented how to do it. It is also a localized change; it only affects your calls to copy_graph.
2. Change to using a non-bundled property and keep using vertex_all. This will require a lot of changes throughout your code base, but avoids needing to deal with the copy problem at all.
-- Jeremiah Willcock
On Tue, Jun 5, 2012 at 7:23 PM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote: On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
Is there a nightly build or do i need to get it from svn?in case this is contained in the graph library you can send me the files and i will try to compile it with them.
I don't see any nightly builds, so it looks like you might need to get them from SVN. There are many files that changed, so I can't really send you all of them. Some of the changes (after the refactoring) also depend on Type Traits Introspection, which also isn't in any releases. I would just try what's in SVN. If that's not practical or you decide not to update your project right now, I can give some ideas for workarounds.
-- Jeremiah Willcock
On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
Can you give an example of non bundled properties? are they properties i created using the BOOST_INSTALL ?
You can use an existing property name as well, such as vertex_name (or vertex_all). You would then need to change accesses from g[v] to get(vertex_name, g, v) (or cache get(vertex_name, g) and use get(that, v)). There is an example at http://www.boost.org/doc/libs/1_49_0/libs/graph/example/vertex-name-property... (there is also an edge property one at http://www.boost.org/doc/libs/1_49_0/libs/graph/example/edge_property.cpp using a custom property name). -- Jeremiah Willcock
On Tue, Jun 5, 2012 at 7:27 PM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote: On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
We can do them both.Let me know of workarounds and i will try to update to check if it was resolved (so you will get a chance to fix it in case it wasn't :-) )
OK. I think you basically have two workarounds:
1. Use a custom copy function that copies your bundled property. This is probably simple, and it is documented how to do it. It is also a localized change; it only affects your calls to copy_graph.
2. Change to using a non-bundled property and keep using vertex_all. This will require a lot of changes throughout your code base, but avoids needing to deal with the copy problem at all.
-- Jeremiah Willcock
On Tue, Jun 5, 2012 at 7:23 PM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote: On Tue, 5 Jun 2012, Avishay Ben Shabtai wrote:
Is there a nightly build or do i need to get it from svn?in case this is contained in the graph library you can send me the files and i will try to compile it with them.
I don't see any nightly builds, so it looks like you might need to get them from SVN. There are many files that changed, so I can't really send you all of them. Some of the changes (after the refactoring) also depend on Type Traits Introspection, which also isn't in any releases. I would just try what's in SVN. If that's not practical or you decide not to update your project right now, I can give some ideas for workarounds.
-- Jeremiah Willcock
participants (2)
-
Avishay Ben Shabtai
-
Jeremiah Willcock