Loading...
Searching...
No Matches
CF_wrap.cc File Reference
`#include "kernel/mod2.h"`
`#include <sstream>`
`#include <boost/python.hpp>`
`#include "factory/factory.h"`

Go to the source code of this file.

## Functions

static boost::python::object | CF_as_str (const CanonicalForm &f)
void | export_CF ()

## Function Documentation

## CF_as_str()

boost::python::object CF_as_str | ( | const CanonicalForm & | f | ) |

static

Definition at line 9 of file CF_wrap.cc.

{
using boost::python::str;
std::basic_stringstream<char> s;
s<<f;
return boost::python::str(s.str());
}
f
FILE * f
Definition checklibs.c:9
s
const CanonicalForm int s
Definition facAbsFact.cc:51

## export_CF()

void export_CF | ( |  | ) |

Definition at line 17 of file CF_wrap.cc.

{
boost::python::class_<CanonicalForm>("canonical_form")
.def(boost::python::init <const int>())
.def(boost::python::init <const Variable>())
#ifndef NOSTREAMIO
.def("__str__", CF_as_str)
#endif
.def(-self)
.def(self*=self)
.def(self+=self)
.def(self-=self)
.def(self/=self)
.def(self==self)
.def(self+self)
.def(self*self)
.def(self/self)
.def(self-self)
.def(int()==self)
.def(int()+self)
.def(int()*self)
.def(int()/self)
.def(int()-self)
.def(self==int())
.def(self+int())
.def(self*int())
.def(self/int())
.def(self-int())
.def(self*=int())
.def(self+=int())
.def(self-=int())
.def(self/=int());
}
CF_as_str
static boost::python::object CF_as_str(const CanonicalForm &f)
Definition CF_wrap.cc:9