Loading...
Searching...
No Matches
intvec_wrap.cc File Reference
`#include "kernel/mod2.h"`
`#include <boost/python.hpp>`
`#include <boost/python/suite/indexing/vector_indexing_suite.hpp>`
`#include "IIntvec.h"`
`#include "intvec_wrap.h"`

Go to the source code of this file.

## Functions

static boost::python::object | intvec_as_str (const Intvec &p)
void | export_intvec ()

## Function Documentation

## export_intvec()

void export_intvec | ( |  | ) |

Definition at line 30 of file intvec_wrap.cc.

{
boost::python::class_<Intvec>("IntVector")
.def("__str__", intvec_as_str)
.def(boost::python::init <>())
.def(boost::python::vector_indexing_suite<Intvec>());
}
intvec_as_str
static boost::python::object intvec_as_str(const Intvec &p)
Definition intvec_wrap.cc:10

## intvec_as_str()

boost::python::object intvec_as_str | ( | const Intvec & | p | ) |

static

Definition at line 10 of file intvec_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(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