@@ -12,31 +12,17 @@ using namespace proxsuite::nlp::python;
12
12
using context::ConstVectorRef;
13
13
using context::Manifold;
14
14
using context::MatrixRef;
15
+ using context::MatrixXs;
15
16
using context::Scalar;
16
17
using context::VectorRef;
18
+ using context::VectorSpace;
19
+ using context::VectorXs;
17
20
using PolyManifold = xyz::polymorphic<Manifold>;
18
21
using CartesianProduct = CartesianProductTpl<Scalar>;
19
22
20
- void exposeManifoldBase ();
21
23
void exposeCartesianProduct ();
22
24
23
25
void exposeManifolds () {
24
-
25
- exposeManifoldBase ();
26
-
27
- /* Basic vector space */
28
- bp::class_<VectorSpaceTpl<Scalar>, bp::bases<Manifold>>(
29
- " VectorSpace" , " Basic Euclidean vector space." , bp::no_init)
30
- .def (bp::init<const int >((" self" _a, " dim" )))
31
- .def (PolymorphicVisitor<PolyManifold>())
32
- .enable_pickling_ (true );
33
-
34
- exposeCartesianProduct ();
35
- }
36
-
37
- void exposeManifoldBase () {
38
- using context::MatrixXs;
39
- using context::VectorXs;
40
26
register_polymorphic_to_python<PolyManifold>();
41
27
42
28
using BinaryFunTypeRet = VectorXs (Manifold::*)(const ConstVectorRef &,
@@ -125,6 +111,15 @@ void exposeManifoldBase() {
125
111
" StdVec_Manifold" ,
126
112
eigenpy::details::overload_base_get_item_for_std_vector<
127
113
std::vector<PolyManifold>>());
114
+
115
+ /* Basic vector space */
116
+ bp::class_<VectorSpace, bp::bases<Manifold>>(
117
+ " VectorSpace" , " Basic Euclidean vector space." , bp::no_init)
118
+ .def (bp::init<const int >((" self" _a, " dim" )))
119
+ .def (PolymorphicVisitor<PolyManifold>())
120
+ .enable_pickling_ (true );
121
+
122
+ exposeCartesianProduct ();
128
123
}
129
124
130
125
} // namespace aligator::python
0 commit comments