[Lemon-user] Copy constructors
D Haley
mycae at yahoo.com
Tue Feb 23 16:15:04 CET 2010
Hello again,
I am having more troubles with edgemaps (thanks for the prev. help, worked a treat). Due to the library interface, the copy constructors are private for edgemaps, which seem to prevent me assigning or dupliating them in any way. Is there a way I can do something like the following? I'm currently dropping to pointer semantics, but it feels like a kludge.
vector<lemon::ListGraph> g;
vector<lemon::ListGraph::EdgeMap<float> > edgeCostVec;
makeSomeGraphs(g); //pass-by-ref (non-const)
edgeCostVec[ui].resize(g.size());
for(unsigned int ui=0;ui<g.size(); ui++)
edgeCostVec[ui] = (lemon::ListGraph::EdgeMap<float>(g[ui]));
More information about the Lemon-user
mailing list