Boost logo

Boost :

Subject: Re: [boost] How to construct a reverse_edge_map from CSR
From: Dan Jiang (danjiang_at_[hidden])
Date: 2010-04-16 15:27:11


Hi Jeremiah,
Here is the code for this error. Hope it is more readable.
typedef compressed_sparse_row_graph<directedS> Traits;
struct EdgeProp{
   float capacity;
   float residual_capacity;
   Traits::edge_descriptor reverse_edge;
};

typedef compressed_sparse_row_graph<directedS,
                        property<vertex_index_t, DWORD32>, EdgeProp, // bundled property
                        no_property, // Graph Property
                        DWORD32, // Vertex Type
                        DWORD32> // EdgeIndex Type
                        BOOST_Graph;

Errors:
C:\Program Files (x86)\boost\boost_1_42\boost/graph/compressed_sparse_row_graph.hpp(1321) : error C2780: 'V boost::target(const incidence_graph_archetype<Vertex,Directed,ParallelCategory,Base>::edge_descriptor &,const
boost::incidence_graph_archetype<Vertex,Directed,ParallelCategory,Base> &)' : expects 2 arguments - 1 provided C:\Program Files (x86)\boost\boost_1_42\boost/graph/graph_archetypes.hpp(64) : see declaration of 'boost::target' .\NetFlow.cpp(209) : see reference to function template instantiation 'std::pair<_Ty1,_Ty2>
boost::edge<boost::directedS,boost::property<Tag,T>,EdgeProp,boost::no_property,unsigned int,DWORD32>(Vertex,Vertex,const boost::compressed_sparse_row_graph<Directed,VertexProperty,EdgeProperty,GraphProperty,Vertex,EdgeIndex> &)' being compiled with [ _Ty1=boost::detail::csr_edge_descriptor<size_t,size_t>, _Ty2=bool, Tag=boost::vertex_index_t, T=DWORD32, Vertex=unsigned int, Directed=boost::directedS, VertexProperty=boost::property<boost::vertex_index_t,DWORD32>, EdgeProperty=EdgeProp, GraphProperty=boost::no_property, EdgeIndex=DWORD32 ]
C:\Program Files (x86)\boost\boost_1_42\boost/graph/compressed_sparse_row_graph.hpp(1321) : error C2780: 'Vertex boost::target(compressed_sparse_row_graph<Directed,VertexProperty,EdgeProperty,GraphProperty,Vertex,EdgeIndex>::edge_descriptor,const boost::compressed_sparse_row_graph<Directed,VertexProperty,EdgeProperty,GraphProperty,Vertex,EdgeIndex> &)' : expects 2 arguments - 1 provided Error line is: if (target(*range.first) == j)
C:\Program Files (x86)\boost\boost_1_42\boost/graph/compressed_sparse_row_graph.hpp(1241) : see declaration of 'boost::target'
C:\Program Files (x86)\boost\boost_1_42\boost/graph/compressed_sparse_row_graph.hpp(1321) : error C2780: 'Vertex boost::target(const boost::detail::edge_base<Directed,Vertex> &,const boost::adjacency_list<OutEdgeListS,VertexListS,DirectedS,VertexProperty,EdgeProperty,GraphProperty,EdgeListS> &)' : expects 2 arguments - 1 provided
C:\Program Files (x86)\boost\boost_1_42\boost/graph/adjacency_list.hpp(530) : see declaration of 'boost::target'
C:\Program Files (x86)\boost\boost_1_42\boost/graph/compressed_sparse_row_graph.hpp(1321) : error C2780: 'filtered_graph_base<G>::vertex_descriptor boost::target(filtered_graph_base<G>::edge_descriptor,const boost::filtered_graph_base<G> &)' : expects 2 arguments - 1 provided: Error line is: if (target(*range.first) == j)
>
> Could you please reformat your code to be more readable? What is the
> exact type of your graph, and what are the definitions of the vertex and
> edge bundled property classes?
>
> -- Jeremiah Willcock
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

                                               
_________________________________________________________________
Live connected. Get Hotmail & Messenger on your phone.
http://go.microsoft.com/?linkid=9724462


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