My Project
Loading...
Searching...
No Matches
Singular
dyn_modules
python
CF_wrap.cc
Go to the documentation of this file.
1
#include "
kernel/mod2.h
"
2
#ifdef HAVE_PYTHON
3
#include <sstream>
4
#include <boost/python.hpp>
5
#include "
factory/factory.h
"
6
7
using
boost::python::self;
8
#ifndef NOSTREAMIO
9
static
boost::python::object
CF_as_str
(
const
CanonicalForm
&
f
)
10
{
11
using
boost::python::str;
12
std::basic_stringstream<char>
s
;
13
s
<<
f
;
14
return
boost::python::str(
s
.str());
15
}
16
#endif
17
void
export_CF
(){
18
boost::python::class_<CanonicalForm>(
"canonical_form"
)
19
.def(boost::python::init <const int>())
20
.def(boost::python::init <const Variable>())
21
#ifndef NOSTREAMIO
22
.def(
"__str__"
,
CF_as_str
)
23
#endif
24
.def(-self)
25
.def(self*=self)
26
.def(self+=self)
27
.def(self-=self)
28
.def(self/=self)
29
.def(self==self)
30
.def(self+self)
31
.def(self*self)
32
.def(self/self)
33
.def(self-self)
34
.def(
int
()==self)
35
.def(
int
()+self)
36
.def(
int
()*self)
37
.def(
int
()/self)
38
.def(
int
()-self)
39
.def(self==
int
())
40
.def(self+
int
())
41
.def(self*
int
())
42
.def(self/
int
())
43
.def(self-
int
())
44
.def(self*=
int
())
45
.def(self+=
int
())
46
.def(self-=
int
())
47
.def(self/=
int
());
48
}
49
#endif
CF_as_str
static boost::python::object CF_as_str(const CanonicalForm &f)
Definition
CF_wrap.cc:9
export_CF
void export_CF()
Definition
CF_wrap.cc:17
f
FILE * f
Definition
checklibs.c:9
CanonicalForm
factory's main class
Definition
canonicalform.h:86
s
const CanonicalForm int s
Definition
facAbsFact.cc:51
factory.h
‘factory.h’ is the user interface to Factory.
mod2.h
Generated on Thu Mar 20 2025 00:00:00 for My Project by
doxygen 1.13.2
for
Singular