Changeset af598e in git


Ignore:
Timestamp:
May 4, 2011, 7:50:23 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
107b6a63f83a561264dff51b21ba9a08c2b381f8
Parents:
02c42db0b19db524ec869930bffc30346b16abed
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-05-04 19:50:23+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:35+01:00
Message:
ADD: factory-related wrappers (clapsing.cc/.h)
FIX: ring-dependent fixes for some factory-dependent code
TODO: finish fixing clapsing.cc/.h
Location:
libpolys/polys
Files:
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • libpolys/polys/Makefile.am

    r02c42d raf598e  
    3737        pDebug.cc pInline0.cc polys0.cc prCopy.cc \
    3838        kbuckets.cc sbuckets.cc weight.cc weight0.c simpleideals.cc matpol.cc \
    39   ${USE_P_PROCS_STATIC_CC} ${USE_P_PROCS_DYNAMIC_CC} templates/mod_raw.cc
     39        ${USE_P_PROCS_STATIC_CC} ${USE_P_PROCS_DYNAMIC_CC} templates/mod_raw.cc \
     40        clapsing.cc
    4041
    4142BUILT_SOURCES = templates/p_Procs.inc
     
    5152        templates/p_Procs_Dynamic.h templates/p_Procs_Impl.h templates/p_Procs_Set.h templates/p_Procs_Static.h \
    5253        monomials/p_polys.h monomials/polys-impl.h monomials/maps.h polys.h prCopy.h prCopyMacros.h \
    53         kbuckets.h sbuckets.h simpleideals.h weight.h \
    54   matpol.h
     54        kbuckets.h sbuckets.h simpleideals.h weight.h matpol.h \
     55        clapsing.h
    5556
    5657P_PROCS_CPPFLAGS_COMMON = -DHAVE_CONFIG_H -DDYNAMIC_VERSION
  • libpolys/polys/clapsing.cc

    r02c42d raf598e  
    99
    1010//#define FACTORIZE2_DEBUG
    11 #include <kernel/mod2.h>
     11#include "config.h"
     12#include <misc/auxiliary.h>
     13
     14
     15TODO(Martin, Please adapt the following code for the use in SW)
     16#ifdef HAVE_FACTORY
     17
     18#define SI_DONT_HAVE_GLOBAL_VARS
    1219#include <omalloc/omalloc.h>
    13 #ifdef HAVE_FACTORY
    14 #define SI_DONT_HAVE_GLOBAL_VARS
    15 #include <kernel/structs.h>
    16 #include <kernel/clapsing.h>
    17 #include <kernel/numbers.h>
    18 #include <kernel/ring.h>
    19 #include <kernel/ideals.h>
    20 #include <kernel/ffields.h>
     20#include <coeffs/numbers.h>
     21#include <coeffs/coeffs.h>
     22
     23// #include <kernel/ffields.h>
     24// #include <kernel/clapconv.h>
     25// #include <libfac/factor.h>
     26
    2127#include <factory/factory.h>
    22 #include <kernel/clapconv.h>
    23 #include <libfac/factor.h>
    24 #include <kernel/ring.h>
     28
     29#include "clapsing.h"
     30#include "monomials/ring.h"
     31#include "simpleideals.h"
     32
    2533
    2634void out_cf(const char *s1,const CanonicalForm &f,const char *s2);
     
    16521660  return mm;
    16531661}
    1654 #endif
    1655 
     1662/*
    16561663napoly singclap_alglcm ( napoly f, napoly g )
    16571664{
     
    17351742 Off(SW_RATIONAL);
    17361743}
     1744*/
    17371745
    17381746#if 0
  • libpolys/polys/clapsing.h

    r02c42d raf598e  
    1212#define INCL_FACTORYSING_H
    1313
    14 #include <kernel/structs.h>
    15 #include <kernel/polys.h>
    16 #include <kernel/ideals.h>
    17 #include <kernel/intvec.h>
    18 #include <kernel/matpol.h>
    19 #include <kernel/longtrans.h>
     14// #include <kernel/structs.h>
     15#include <polys/monomials/p_polys.h>
     16#include <polys/monomials/ring.h>
     17#include <polys/simpleideals.h>
     18#include <misc/intvec.h>
     19#include <polys/matpol.h>
     20//#include <kernel/longtrans.h>
    2021
    2122poly singclap_gcd ( poly f, poly g );
    2223poly singclap_gcd_r ( poly f, poly g, const ring r );
     24/*
    2325napoly singclap_alglcm ( napoly f, napoly g );
    2426void singclap_algdividecontent ( napoly f, napoly g, napoly &ff, napoly &gg );
     27*/
    2528
    2629poly singclap_resultant ( poly f, poly g , poly x);
     
    5356poly singclap_det( const matrix m );
    5457int singclap_det_i( intvec * m );
    55 
     58/*
    5659BOOLEAN jjRESULTANT(leftv res, leftv u, leftv v, leftv w);
    5760BOOLEAN jjCHARSERIES(leftv res, leftv u);
     
    5962BOOLEAN jjIS_SQR_FREE(leftv res, leftv u);
    6063#endif
     64*/
    6165
    6266#endif /* INCL_FACTORYSING_H */
  • libpolys/polys/monomials/p_polys.cc

    r02c42d raf598e  
    2020#include <coeffs/longrat.h> // ???
    2121
    22 #include <polys/weight.h>
    23 #include <polys/simpleideals.h>
    24 
    25 #include <polys/monomials/ring.h>
    26 #include <polys/monomials/p_polys.h>
     22#include "weight.h"
     23#include "simpleideals.h"
     24
     25#include "monomials/ring.h"
     26#include "monomials/p_polys.h"
    2727
    2828// #include <???/ideals.h>
     
    3434
    3535#ifdef HAVE_PLURAL
    36 #include <polys/nc/nc.h>
    37 #include <polys/nc/sca.h>
    38 #endif
    39 
    40 #include <polys/coeffrings.h>
     36#include "nc/nc.h"
     37#include "nc/sca.h"
     38#endif
     39
     40#include "coeffrings.h"
     41#include "clapsing.h"
     42
    4143
    4244/***************************************************************
  • libpolys/polys/simpleideals.cc

    r02c42d raf598e  
    1111#include "config.h"
    1212#include <misc/auxiliary.h>
     13
     14#include <omalloc/omalloc.h>
     15
    1316#include <misc/options.h>
    14 #include <omalloc/omalloc.h>
    15 #include <polys/monomials/p_polys.h>
    16 #include <polys/weight.h>
    17 #include <polys/matpol.h>
    1817#include <misc/intvec.h>
    19 #include <polys/simpleideals.h>
     18
     19#include <coeffs/longrat.h>
     20 
     21#include "monomials/p_polys.h"
     22#include "weight.h"
     23#include "matpol.h"
     24#include "simpleideals.h"
    2025#include "sbuckets.h"
    2126
     
    16641669
    16651670#ifdef HAVE_FACTORY
     1671#if 0
    16661672poly id_GCD(poly f, poly g, const ring r)
    16671673{
     
    16701676  ideal I=idInit(2,1); I->m[0]=f; I->m[1]=g;
    16711677  intvec *w = NULL;
     1678
    16721679  ideal S=idSyzygies(I,testHomog,&w);
     1680
    16731681  if (w!=NULL) delete w;
    16741682  poly gg=pTakeOutComp(&(S->m[0]),2);
     
    16801688}
    16811689#endif
     1690#endif
    16821691
    16831692/*2
     
    16891698*/
    16901699#ifdef HAVE_FACTORY
    1691 ideal idChineseRemainder(ideal *xx, number *q, int rl, const ring r)
     1700ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring R)
    16921701{
    16931702  int cnt=IDELEMS(xx[0])*xx[0]->nrows;
     
    17081717        h=xx[j]->m[i];
    17091718        if ((h!=NULL)
    1710         &&((r==NULL)||(pLmCmp(r,h)==-1)))
     1719        &&((r==NULL)||(p_LmCmp(r,h,R)==-1)))
    17111720          r=h;
    17121721      }
    17131722      if (r==NULL) break;
    1714       h=pHead(r);
     1723      h=p_Head(r, R);
    17151724      for(j=rl-1;j>=0;j--)
    17161725      {
    17171726        hh=xx[j]->m[i];
    1718         if ((hh!=NULL) && (pLmCmp(r,hh)==0))
     1727        if ((hh!=NULL) && (p_LmCmp(r,hh, R)==0))
    17191728        {
    1720           x[j]=pGetCoeff(hh);
    1721           hh=pLmFreeAndNext(hh);
     1729          x[j]=p_GetCoeff(hh, R);
     1730          hh=p_LmFreeAndNext(hh, R);
    17221731          xx[j]->m[i]=hh;
    17231732        }
    17241733        else
    1725           x[j]=nlInit(0, r);
    1726       }
    1727       number n=nlChineseRemainder(x,q,rl);
     1734          x[j]=nlInit(0, R->cf); // is R->cf really n_Q???
     1735      }
     1736       
     1737      number n=nlChineseRemainder(x,q,rl); // kernel/clapconv.cc
     1738
    17281739      for(j=rl-1;j>=0;j--)
    17291740      {
    17301741        x[j]=NULL; // nlInit(0...) takes no memory
    17311742      }
    1732       if (nlIsZero(n)) pDelete(&h);
     1743      if (nlIsZero(n, R->cf)) p_Delete(&h, R);
    17331744      else
    17341745      {
    1735         pSetCoeff(h,n);
     1746        p_SetCoeff(h,n, R);
    17361747        //Print("new mon:");pWrite(h);
    1737         res_p=pAdd(res_p,h);
     1748        res_p=p_Add_q(res_p, h, R);
    17381749      }
    17391750    }
     
    17411752  }
    17421753  omFree(x);
    1743   for(i=rl-1;i>=0;i--) idDelete(&(xx[i]));
     1754  for(i=rl-1;i>=0;i--) id_Delete(&(xx[i]), R);
    17441755  omFree(xx);
    17451756  return result;
Note: See TracChangeset for help on using the changeset viewer.