Changeset 4e2486 in git for modules


Ignore:
Timestamp:
Aug 17, 2005, 11:14:34 AM (19 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '4188d308699580d975efd0f6cca8dcb41c396f70')
Children:
650d1417bb87b3339aa5ce123bb3ca01e61f181f
Parents:
6bfb0efc1cc28f45f85a083258997bf49484fa3b
Message:
*bricken: more work on vectors


git-svn-id: file:///usr/local/Singular/svn/trunk@8515 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
modules/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/python/polytester

    r6bfb0e r4e2486  
    1818print z+xy
    1919print z,xy
    20 print xy+xy*xy
     20#print xy+xy*xy
    2121print xy
    2222for t in (xy*xy+xy+polynomial(1)):
  • modules/python/wrapper.h

    r6bfb0e r4e2486  
    1 //$Id: wrapper.h,v 1.4 2005-08-17 06:33:04 bricken Exp $
     1//$Id: wrapper.h,v 1.5 2005-08-17 09:14:21 bricken Exp $
    22#ifndef PYTHON_SINGULAR_WRAPPER_HEADER
    33#define PYTHON_SINGULAR_WRAPPER_HEADER
     
    2222}
    2323
    24 static boost::python::object Poly_as_str(Poly p)
     24static boost::python::object Poly_as_str(Poly& p)
    2525{
    2626  using boost::python::str;
     
    3030  return boost::python::str(out,strlen(out));
    3131}
     32
    3233
    3334BOOST_PYTHON_MODULE(Singular){
     
    8384    .def(self*=Number())
    8485    .def(self*self);
     86    boost::python::class_<PolyBase<POLY_VARIANT_MODUL> >("vector")
     87   
     88    .def(boost::python::init <>())
     89   
     90   
     91    .def("__str__", Poly_as_str)
     92    .def("__iter__", boost::python::iterator<PolyBase<POLY_VARIANT_MODUL> >())
     93    //read monomials (only) from string
     94    //.def(boost::python::init <const char* >())
     95   
     96      //.def("__str__", as_str)
     97      //.def(-self)
     98
     99    .def(self+=self)
     100      //    .def(self-=self)
     101      //.def(self/=self)
     102      //.def(self==self)
     103    .def(self+self)
     104    .def(self*=Number())
     105      .def(self*Number());
     106      //.def(self+Number())
     107      //.def(self+=Number())
     108      //.def(self*=Number());
     109
    85110  //boost::python::class_<TermReference>("termreference");
    86111    //.def(self/self)
Note: See TracChangeset for help on using the changeset viewer.