Boost logo

Boost :

Subject: Re: [boost] [Boost Graph Library] Having trouble constructing necessary parameters for the isomorphism algorithm
From: Alexander Bock (sky_ax_at_[hidden])
Date: 2011-01-03 06:33:21


Thank you for your suggestion, that should make it a whole lot simpler. When I try to compile the following though, I get an error stating that Boost cannot find a certain property. I am not sure which property it is, but I think it might be something to do with the fact that I'm using bundled properties. I see the vertex_index_t property, but I since I am using bundled properties (with my own index property), maybe I need to tell Boost to use that instead, like I do in the index property maps?
 
vector<VertexDescriptor> f(GetNoVertices());
property_map<UndirectedGraph, int VertexProperty::*>::type indexMap1 = get(&VertexProperty::index, uGraph);
property_map<UndirectedGraph, int VertexProperty::*>::type indexMap2 = get(&VertexProperty::index, comaparableGraph.GetGraph());
 
isomorphism(uGraph, comparableGraph.GetGraph(), isomorphism_map(make_iterator_property_map(f.begin(), indexMap1, f[0])));

Here's the error messages I get (1 error, 13 warnings):
 
1>Compiling...
1>BoostGraph.cpp
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(34) : warning C4018: '<' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(294) : warning C4018: '<' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(359) : warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(426) : warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(472) : warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(473) : warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(511) : warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(512) : warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(547) : warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(565) : warning C4101: 'foundpos' : unreferenced local variable
1>c:\documents and settings\admin\dokumenter\boost\boost_1_43_0\boost\property_map\property_map.hpp(444) : error C2664: 'boost::detail::error_property_not_found::error_property_not_found(const boost::detail::error_property_not_found &)' : cannot convert parameter 1 from 'size_t' to 'const boost::detail::error_property_not_found &'
1> Reason: cannot convert from 'size_t' to 'const boost::detail::error_property_not_found'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1> c:\documents and settings\admin\dokumenter\boost\boost_1_43_0\boost\property_map\property_map.hpp(440) : while compiling class template member function 'boost::safe_iterator_property_map<RandomAccessIterator,IndexMap,T,R>::safe_iterator_property_map(RandomAccessIterator,size_t,const IndexMap &)'
1> with
1> [
1> RandomAccessIterator=std::_Vector_iterator<VertexDescriptor ,std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::listS,boost::listS,boost::undirectedS,VertexProperty,EdgeProperty,boost::no_property,boost::listS>,boost::listS,boost::listS,boost::undirectedS,boost::property<boost::vertex_bundle_t,VertexProperty>,boost::property<boost::edge_bundle_t,EdgeProperty>,boost::no_property,boost::listS>::config::vertex_ptr >>,
1> IndexMap=boost::adj_list_vertex_property_map<UndirectedGraph,boost::detail::error_property_not_found,const boost::detail::error_property_not_found &,boost::vertex_index_t>,
1> T=vertex2_t,
1> R=vertex2_t &
1> ]
1> c:\documents and settings\admin\dokumenter\boost\boost_1_43_0\boost\graph\isomorphism.hpp(412) : see reference to class template instantiation 'boost::safe_iterator_property_map<RandomAccessIterator,IndexMap,T,R>' being compiled
1> with
1> [
1> RandomAccessIterator=std::_Vector_iterator<VertexDescriptor ,std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::listS,boost::listS,boost::undirectedS,VertexProperty,EdgeProperty,boost::no_property,boost::listS>,boost::listS,boost::listS,boost::undirectedS,boost::property<boost::vertex_bundle_t,VertexProperty>,boost::property<boost::edge_bundle_t,EdgeProperty>,boost::no_property,boost::listS>::config::vertex_ptr >>,
1> IndexMap=boost::adj_list_vertex_property_map<UndirectedGraph,boost::detail::error_property_not_found,const boost::detail::error_property_not_found &,boost::vertex_index_t>,
1> T=vertex2_t,
1> R=vertex2_t &
1> ]
1> c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\boostgraph.cpp(328) : see reference to function template instantiation 'bool boost::isomorphism<UndirectedGraph,UndirectedGraph,boost::iterator_property_map<RandomAccessIterator,IndexMap,T,R>,boost::vertex_isomorphism_t,boost::no_property>(const Graph1 &,const Graph2 &,const boost::bgl_named_params<boost::iterator_property_map<RandomAccessIterator,IndexMap,T,R>,Tag,Base> &)' being compiled
1> with
1> [
1> RandomAccessIterator=std::_Vector_iterator<VertexDescriptor ,std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::listS,boost::listS,boost::undirectedS,VertexProperty,EdgeProperty,boost::no_property,boost::listS>,boost::listS,boost::listS,boost::undirectedS,boost::property<boost::vertex_bundle_t,VertexProperty>,boost::property<boost::edge_bundle_t,EdgeProperty>,boost::no_property,boost::listS>::config::vertex_ptr >>,
1> IndexMap=boost::bundle_property_map<UndirectedGraph,void *,VertexProperty,int>,
1> T=void *,
1> R=void *&,
1> Graph1=UndirectedGraph,
1> Graph2=UndirectedGraph,
1> Tag=boost::vertex_isomorphism_t,
1> Base=boost::no_property
1> ]
1>CommandParser.cpp
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\commandparser.cpp(53) : warning C4018: '<' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\commandparser.cpp(81) : warning C4018: '<' : signed/unsigned mismatch
1>c:\documents and settings\admin\dokumenter\dtu\5. semester\cbs specialkursus\msvc++ project\rna program\rna program\commandparser.cpp(264) : warning C4018: '<' : signed/unsigned mismatch
1>Generating Code...
 
> Date: Fri, 31 Dec 2010 13:00:25 -0500
> From: jewillco_at_[hidden]
> To: boost_at_[hidden]
> Subject: Re: [boost] [Boost Graph Library] Having trouble constructing necessary parameters for the isomorphism algorithm
>
> On Thu, 30 Dec 2010, Alexander Bock wrote:
>
> >
> > Hi all,
> >
> > First of all, I new to the mailing list, so please excuse me for any beginner's mistakes I may make :) I am also new to the Boost Graph Library.
> >
> > I am having some trouble implementing the Boost Graph Library
> > isomorphism algorithm under MSVC++ 2008 Express Edition. Since I am
> > using MSVC++, I cannot use the named parameter method, as specified in
> > the docs. I am not entirely sure, but I think my problem is the vertex
> > invariants that I pass to the algorithm. I am using Boost 1.43.
>
> Please try the named parameter version -- the comment about VC++ is
> probably about version 6, and you are using a much newer (and more
> compliant) version. Otherwise, the actual default used in the
> implementation appears to be difficult to construct. You might be able to
> pass "boost::constant_property_map<VertexDescriptor, int>(0)" as both of
> the invariant arguments (and 1 as vertex_max_invariant), but I'm not sure
> and haven't tried it.
>
> -- Jeremiah Willcock
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
                                               


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk