Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Writing an edge_iterator for add_edges in CSR graph
From: Johan Oudinet (johan.oudinet_at_[hidden])
Date: 2011-04-08 09:04:22

On Fri, Apr 8, 2011 at 1:50 PM, Johan Oudinet <johan.oudinet_at_[hidden]> wrote:
> Hi,
> I'm trying to write an edge_iterator in order to load a CSR graph from
> a GraphViz by using the add_edges method.
> So far, I successfully write a edge_iterator so you can iterate on it
> and dereference it to get either a pair of vertex_descriptor or a edge
> label.
> However, if it try to use this iterator as arguments for the method
> add_edges of CSR graph, I got cryptic errors and I don't know how to
> solve them :-/

Problem solved. My input_iterator must be copy constructible and was
not due to the std::ifstream attribute.
Now, I use a boost::shared_ptr and it solves the compilation errors.

Thanks anyway.

P.S.: It could be a good idea to add an example in CSR documentation
that uses this new add_edges method instead of the old add_edge
method, which is more difficult to use I think.

P.P.S.: Do you plan to adapt the Graphviz reader in order to load CSR graphs?

()  ascii ribbon campaign - against html e-mail
/\   - against proprietary attachments

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at