Loading...
Searching...
No Matches
wrapper.h File Reference
`#include <Python.h>`
`#include <boost/python.hpp>`
`#include <sstream>`
`#include "kernel/mod2.h"`
`#include "kernel/structs.h"`
`#include "coeffs/numbers.h"`
`#include "Singular/ipid.h"`
`#include "Singular/ipshell.h"`
`#include "Number.h"`
`#include "Poly.h"`
`#include "PowerSeries.h"`
`#include "Ideal.h"`
`#include "ideal_wrap.h"`
`#include "factory/factory.h"`
`#include "poly_wrap.h"`
`#include "vector_wrap.h"`
`#include "CF_wrap.h"`
`#include "number_wrap.h"`
`#include "interpreter_support.h"`
`#include "ring_wrap.h"`
`#include "intvec_wrap.h"`

Go to the source code of this file.

## Functions

Vector | unitVector0 (int i)
void | different_ring_translator (DifferentDomainException const &x)
| BOOST_PYTHON_MODULE (Singular)
| BOOST_PYTHON_MODULE (factory)
| BOOST_PYTHON_MODULE (_Singular)

## Function Documentation

## BOOST_PYTHON_MODULE() [1/3]

BOOST_PYTHON_MODULE | ( | _Singular |  | ) |

Definition at line 76 of file wrapper.h.

{
export_interpreter();
}
export_interpreter
void export_interpreter()
Definition interpreter_support.cc:529

## BOOST_PYTHON_MODULE() [2/3]

BOOST_PYTHON_MODULE | ( | factory |  | ) |

Definition at line 68 of file wrapper.h.

{
boost::python::class_<Variable>("variable")
.def(boost::python::init <const int, char>())
.def(boost::python::init <char>())
.def(boost::python::init <const int>());
export_CF();
}
export_CF
void export_CF()
Definition CF_wrap.cc:17

## BOOST_PYTHON_MODULE() [3/3]

BOOST_PYTHON_MODULE | ( | Singular |  | ) |

Definition at line 42 of file wrapper.h.

{
//Print("ref count after add: %d", currRing->ref);
register_exception_translator<
DifferentDomainException>(different_ring_translator);
export_poly();
export_number();
export_vector();
//export_playground();
export_ideal();
export_module();
//export_interpreter();
export_ring();
export_intvec();
boost::python::class_<PowerSeries>("power_series")
.def(boost::python::init <const PowerSeries::numerator_type &,const PowerSeries::denominator_type&>())
.def("__iter__", boost::python::iterator<PowerSeries>());
boost::python::class_<VectorPowerSeries>("vector_power_series")
.def(boost::python::init <const VectorPowerSeries::numerator_type&,const VectorPowerSeries::denominator_type &>())
.def("__iter__", boost::python::iterator<VectorPowerSeries>());
def("gen",unitVector0);
// .def(self+=self)
// .def(self+self)
//.def(self*=Number())
//.def(Number() * self);
}
DifferentDomainException
Definition Poly.h:20
export_module
void export_module()
Definition ideal_wrap.cc:68
export_ideal
void export_ideal()
Definition ideal_wrap.cc:55
export_intvec
void export_intvec()
Definition intvec_wrap.cc:30
export_number
void export_number()
Definition number_wrap.cc:19
export_poly
void export_poly()
Definition poly_wrap.cc:29
export_ring
void export_ring()
Definition ring_wrap.cc:32
export_vector
void export_vector()
unitVector0
Vector unitVector0(int i)
Definition wrapper.h:32
different_ring_translator
void different_ring_translator(DifferentDomainException const &x)
Definition wrapper.h:37

## different_ring_translator()

void different_ring_translator | ( | DifferentDomainException const & | x | ) |

Definition at line 37 of file wrapper.h.

{
PrintS("hoho");
PyErr_SetString(PyExc_UserWarning, "Objects didn't have the same ring");
}
PrintS
void PrintS(const char *s)
Definition reporter.cc:288

## unitVector0()

Vector unitVector0 | ( | int | i | ) |

Definition at line 32 of file wrapper.h.

{
return unitVector(i,currRing);
}
unitVector
Vector unitVector(int i, ring r=currRing)
Definition Poly.h:630
i
int i
Definition cfEzgcd.cc:132
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13