3 #include <boost/python.hpp> 9 #include <boost/python/suite/indexing/vector_indexing_suite.hpp> 10 using boost::python::self;
11 using namespace boost::python;
13 static boost::python::object Ideal_as_str(
const Ideal&
p)
15 using boost::python::str;
28 str
res=helper.join(tojoin);
31 static boost::python::object Module_as_str(
const Module&
p)
33 using boost::python::str;
46 str
res=helper.join(tojoin);
57 boost::python::class_<Ideal>(
"Ideal",
"supports most operation a\ 58 python list supports with the expception, that elements must\ 61 .def(init<const Ideal&>())
62 .def(
"__str__", Ideal_as_str)
63 .def(
"ring",Ideal_get_Ring)
64 .def(boost::python::init <>())
65 .def(vector_indexing_suite<Ideal >());
70 boost::python::class_<Module>(
"Module",
"supports most operation a\ 71 python list supports with the expception, that elements must\ 74 .def(init<const Module&>())
75 .def(
"__str__", Module_as_str)
76 .def(
"ring",Ideal_get_Ring)
77 .def(boost::python::init <>())
78 .def(vector_indexing_suite<Module>());
const CanonicalForm int s
boost::python::str Poly_as_str(const Poly &p)
boost::python::str Vector_as_str(const Vector &p)