32 :
public ::boost::python::vector_indexing_suite<
33 typename container::aligned_vector<T>,
36 contains_vector_derived_policies<typename container::aligned_vector<T>, NoProxy>>
37 ,
public eigenpy::StdContainerFromPythonList<container::aligned_vector<T>>
39 typedef container::aligned_vector<T> vector_type;
40 typedef eigenpy::StdContainerFromPythonList<vector_type, NoProxy> FromPythonListConverter;
43 static void expose(
const std::string & class_name,
const std::string & doc_string =
"")
45 expose(class_name, doc_string, eigenpy::EmptyPythonVisitor());
48 template<
typename VisitorDerived>
50 const std::string & class_name,
const boost::python::def_visitor<VisitorDerived> & visitor)
52 expose(class_name,
"", visitor);
55 template<
typename VisitorDerived>
57 const std::string & class_name,
58 const std::string & doc_string,
59 const boost::python::def_visitor<VisitorDerived> & visitor)
61 namespace bp = boost::python;
62 if (!eigenpy::register_symbolic_link_to_registered_type<vector_type>())
64 bp::class_<vector_type> cl(class_name.c_str(), doc_string.c_str());
68 bp::init<size_t, const value_type &>(
69 bp::args(
"self",
"size",
"value"),
70 "Constructor from a given size and a given value."))
71 .def(bp::init<const vector_type &>(bp::args(
"self",
"other"),
"Copy constructor"))
74 "tolist", &FromPythonListConverter::tolist,
75 (bp::arg(
"self"), bp::arg(
"deep_copy") =
false),
76 "Returns the aligned_vector as a Python list.")
78#ifndef PINOCCHIO_PYTHON_NO_SERIALIZATION 81 .def(eigenpy::CopyableVisitor<vector_type>());
84 if (EnableFromPythonListConverter)
85 FromPythonListConverter::register_converter();