Should this convertion work ?std::unordered_set<std::size_t> tgt = unordered_set (std::initializer_list<size_t> boost::python::stl_input_iterator<size_t>(target_list))If so, is that efficient ?Best,F.2015-04-15 9:03 GMT+02:00 Tiago Peixoto [via Main discussion list for the graph-tool project] <[hidden email]>:Tiago de Paula Peixoto <[hidden email]>On 15.04.2015 01:14, François Kawala wrote:
> About your comment on line 196 (which probably also applies to lines
> 238 and 274), what is proper way to receive a set from python ?
You have to expose the class to Python using boost::python:
http://www.boost.org/doc/libs/1_57_0/libs/python/doc/tutorial/doc/html/python/exposing.html
However, in this case a much more straightforward approach is to receive
any python iterable (a generic boost::python::object in C++), and
convert it to an unordered_set<> in C++, before the algorithm is run.
Best,
Tiago
--
_______________________________________________
graph-tool mailing list
[hidden email]
http://lists.skewed.de/mailman/listinfo/graph-tool
signature.asc (836 bytes) Download Attachment--
Tiago de Paula Peixoto <[hidden email]>
If you reply to this email, your message will be added to the discussion below:http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Mutliple-destination-Shortest-Path-Dijkstra-tp4026059p4026074.htmlTo start a new topic under Main discussion list for the graph-tool project, email [hidden email]
To unsubscribe from Main discussion list for the graph-tool project, click here.
NAML--François Kawala