26 const std::string split_doc =
27 "Takes an point on the product manifold and splits it up between the two "
29 const std::string split_vec_doc =
30 "Takes a tangent vector on the product manifold and splits it up.";
35 bp::class_<CartesianProduct, bp::bases<Manifold>>(
36 "CartesianProduct",
"Cartesian product of two or more manifolds.",
38 .def(bp::init<>(
"self"_a))
39 .def(bp::init<
const std::vector<PolymorphicManifold> &>(
40 (
"self"_a,
"spaces")))
41 .def(bp::init<PolymorphicManifold, PolymorphicManifold>(
42 (
"self"_a,
"left",
"right")))
47 PyErr_SetString(PyExc_IndexError,
"Index out of bounds.");
48 bp::throw_error_already_set();
52 bp::return_internal_reference<>(), (
"self"_a,
"i"),
53 "Get the i-th component of the Cartesian product.")
55 (
"self"_a,
"c"),
"Add a component to the Cartesian product.")
57 "Get the number of components in the Cartesian product.")
63 (
"self"_a,
"x"), split_doc.c_str())
67 " This returns a list of mutable references to each component.")
74 (
"self"_a,
"v"), split_vec_doc.c_str())
78 " This returns a list of mutable references to each component.")
81 "Define a point on the manifold by merging points from each "
84 "Define a tangent vector on the manifold by merging vectors from "