where target_list has type: boost::python::list 
f

2015-04-18 0:02 GMT+02:00 François Kawala <[hidden email]>:
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]>:
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

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
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]>



To 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



--
François Kawala


View this message in context: Re: Mutliple destination Shortest Path Dijkstra
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.