22 const std::string split_doc =
23 "Takes an point on the product manifold and splits it up between the two "
25 const std::string split_vec_doc =
26 "Takes a tangent vector on the product manifold and splits it up.";
31 bp::class_<CartesianProduct, bp::bases<Manifold>>(
32 "CartesianProduct",
"Cartesian product of two or more manifolds.",
34 .def(bp::init<>(
"self"_a))
35 .def(bp::init<
const std::vector<PolymorphicManifold> &>(
36 (
"self"_a,
"spaces")))
37 .def(bp::init<PolymorphicManifold, PolymorphicManifold>(
38 (
"self"_a,
"left",
"right")))
43 PyErr_SetString(PyExc_IndexError,
"Index out of bounds.");
44 bp::throw_error_already_set();
48 bp::return_internal_reference<>(), (
"self"_a,
"i"),
49 "Get the i-th component of the Cartesian product.")
51 (
"self"_a,
"c"),
"Add a component to the Cartesian product.")
53 "Get the number of components in the Cartesian product.")
59 (
"self"_a,
"x"), split_doc.c_str())
63 " This returns a list of mutable references to each component.")
70 (
"self"_a,
"v"), split_vec_doc.c_str())
74 " This returns a list of mutable references to each component.")
77 "Define a point on the manifold by merging points from each "
80 "Define a tangent vector on the manifold by merging vectors from "
ManifoldAbstractTpl< Scalar > Manifold