Changeset 7a2741 in git


Ignore:
Timestamp:
Aug 24, 2005, 12:06:46 PM (19 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
67f14ad6b5d0aa2edbdc38a0c96bcedc91df7ad8
Parents:
c300ecadf7d5fa33f3ab124f335b6cd1b59424b0
Message:
*bricken: faster compilation for vector


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

Legend:

Unmodified
Added
Removed
  • modules/python/Makefile

    rc300eca r7a2741  
    2121INSTALL_PROGRAM = ${INSTALL}
    2222INSTALL_DATA    = ${INSTALL} -m 644
    23 SRCS    = python.cc poly_wrap.cc
    24 OBJS    = python.o poly_wrap.o
    25 DOBJS   = python.og poly_wrap.og
     23SRCS    = python.cc poly_wrap.cc vector_wrap.cc
     24OBJS    = python.o poly_wrap.o vector_wrap.o
     25DOBJS   = python.og poly_wrap.og vector_wrap.og
    2626
    2727all:    python_module.so python_module_g.so
    2828
    29 %.o: %.cc Makefile wrapper.h
     29%.o: %.cc Makefile
    3030        ${CXX} ${CFLAGS} -c -fPIC -DPIC $< -o $*.o
    3131
    32 %.og: %.cc Makefile wrapper.h
     32%.og: %.cc Makefile
    3333        ${CXX} ${DCFLAGS} -c -fPIC -DPIC $< -o $*.og
    3434
  • modules/python/wrapper.h

    rc300eca r7a2741  
    1 //$Id: wrapper.h,v 1.17 2005-08-24 09:27:07 bricken Exp $
     1//$Id: wrapper.h,v 1.18 2005-08-24 10:06:46 bricken Exp $
    22#ifndef PYTHON_SINGULAR_WRAPPER_HEADER
    33#define PYTHON_SINGULAR_WRAPPER_HEADER
     
    2020#include <factory.h>
    2121#include "poly_wrap.h"
     22#include "vector_wrap.h"
    2223extern BOOLEAN errorreported;
    2324extern int inerror;
     
    4445}
    4546
    46 static boost::python::object Vector_as_str(Vector& p)
    47 {
    48   using boost::python::str;
    49   //ring r=p.getRing();
    50  
    51   char* out=p.c_string();
    52   return boost::python::str(out,strlen(out));
    53 }
     47
    5448
    5549
     
    232226    .def(self/=int());
    233227
    234   boost::python::class_<Vector>("vector")
    235     .def(boost::python::init <>())
    236     .def("__str__", Vector_as_str)
    237    
    238     //    .def("__str__", Poly_as_str)
    239     .def("__iter__", boost::python::iterator<Vector>())
    240     .def(-self)
    241     .def(self+=self)
    242    
    243     .def(self+self)
    244     .def(self*=Number())
    245     .def(Poly() * self)
    246     .def(Number() * self);
     228  export_vector();
    247229  boost::python::class_<PowerSeries>("power_series")       
    248230    .def(boost::python::init <const PowerSeries::numerator_type &,const PowerSeries::denominator_type&>())
Note: See TracChangeset for help on using the changeset viewer.