graph_blockmodel_covariates.cc:695:16: error: 'dense_hash_map' was not declared in this scopetypedef vector<dense_hash_map<size_t, size_t, std::hash<size_t>>> bmap_t;^graph_blockmodel_covariates.cc:695:63: error: wrong number of template arguments (3, should be 2)typedef vector<dense_hash_map<size_t, size_t, std::hash<size_t>>> bmap_t;^In file included from /usr/include/c++/4.8/vector:64:0,from /usr/include/c++/4.8/bits/random.h:34,from /usr/include/c++/4.8/random:50,from /usr/include/c++/4.8/bits/stl_algo.h:65,from /usr/include/c++/4.8/algorithm:62,from /usr/include/boost/function/detail/prologue.hpp:13,from /usr/include/boost/function/function_template.hpp:13,from /usr/include/boost/function/detail/maybe_include.hpp:13,from /usr/include/boost/function/function0.hpp:11,from /usr/include/boost/python/errors.hpp:13,from /usr/include/boost/python/handle.hpp:11,from /usr/include/boost/python/args_fwd.hpp:10,from /usr/include/boost/python/args.hpp:10,from /usr/include/boost/python.hpp:11,from graph_blockmodel_covariates.cc:19:/usr/include/c++/4.8/bits/stl_vector.h:210:11: error: provided for 'template<class _Tp, class _Alloc> class std::vector'class vector : protected _Vector_base<_Tp, _Alloc>^graph_blockmodel_covariates.cc:695:65: error: expected unqualified-id before '>' tokentypedef vector<dense_hash_map<size_t, size_t, std::hash<size_t>>> bmap_t;
where target_list has type: boost::python::listf2015-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]>: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--François Kawala
View this message in context: Re: Mutliple destination Shortest Path DijkstraSent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
_______________________________________________
graph-tool mailing list
graph-tool@skewed.de
http://lists.skewed.de/mailman/listinfo/graph-tool