Loading...
Searching...
No Matches
ideal_wrap.cc File Reference
`#include "kernel/mod2.h"`
`#include <boost/python.hpp>`
`#include "Poly.h"`
`#include "Ideal.h"`
`#include "ring_wrap.h"`
`#include "poly_wrap.h"`
`#include <boost/python/suite/indexing/vector_indexing_suite.hpp>`

Go to the source code of this file.

## Functions

static boost::python::object | Ideal_as_str (const Ideal &p)
static boost::python::object | Module_as_str (const Module &p)
static Ring | Ideal_get_Ring (const Ideal &p)
void | export_ideal ()
void | export_module ()

## Function Documentation

## export_ideal()

void export_ideal | ( |  | ) |

Definition at line 55 of file ideal_wrap.cc.

{
boost::python::class_<Ideal>("Ideal", "supports most operation a\
python list supports with the expception, that elements must\
be Polynomials")
.def(init<>())
.def(init<const Ideal&>())
.def("__str__", Ideal_as_str)
.def("ring",Ideal_get_Ring)
.def(boost::python::init <>())
.def(vector_indexing_suite<Ideal >());
}
Ideal_get_Ring
static Ring Ideal_get_Ring(const Ideal &p)
Definition ideal_wrap.cc:50
Ideal_as_str
static boost::python::object Ideal_as_str(const Ideal &p)
Definition ideal_wrap.cc:13

## export_module()

void export_module | ( |  | ) |

Definition at line 68 of file ideal_wrap.cc.

{
boost::python::class_<Module>("Module", "supports most operation a\
python list supports with the expception, that elements must\
be Polynomials")
.def(init<>())
.def(init<const Module&>())
.def("__str__", Module_as_str)
.def("ring",Ideal_get_Ring)
.def(boost::python::init <>())
.def(vector_indexing_suite<Module>());
}
Module_as_str
static boost::python::object Module_as_str(const Module &p)
Definition ideal_wrap.cc:31

## Ideal_as_str()

boost::python::object Ideal_as_str | ( | const Ideal & | p | ) |

static

Definition at line 13 of file ideal_wrap.cc.

{
using boost::python::str;
//ring r=p.getRing();
str helper;
list tojoin;
int i;
int s=p.size();
//tojoin.append("[");
for(i=0;i<s;i++){
tojoin.append(Poly_as_str(p[i]));
if (i<s-1)
tojoin.append(", ");
}
//tojoin.append("]");
str res=helper.join(tojoin);
return res;
}
i
int i
Definition cfEzgcd.cc:132
p
int p
Definition cfModGcd.cc:4086
s
const CanonicalForm int s
Definition facAbsFact.cc:51
res
CanonicalForm res
Definition facAbsFact.cc:60
LibThread::str
char * str(leftv arg)
Definition shared.cc:699
Poly_as_str
boost::python::str Poly_as_str(const Poly &p)
Definition poly_wrap.cc:10

## Ideal_get_Ring()

Ring Ideal_get_Ring | ( | const Ideal & | p | ) |

static

Definition at line 50 of file ideal_wrap.cc.

{
return p.getRing();
}

## Module_as_str()

boost::python::object Module_as_str | ( | const Module & | p | ) |

static

Definition at line 31 of file ideal_wrap.cc.

{
using boost::python::str;
//ring r=p.getRing();
str helper;
list tojoin;
int i;
int s=p.size();
//tojoin.append("[");
for(i=0;i<s;i++){
tojoin.append(Vector_as_str(p[i]));
if (i<s-1)
tojoin.append(", ");
}
//tojoin.append("]");
str res=helper.join(tojoin);
return res;
}
Vector_as_str
boost::python::str Vector_as_str(const Vector &p)
Definition poly_wrap.cc:18