- Timestamp:
- Mar 22, 2011, 10:21:59 AM (13 years ago)
- Branches:
- (u'spielwiese', '2fa36c576e6a4ddbb1093b43c7f8e9835e17e52a')
- Children:
- ba0fc3d4dcb089fc5523e7af222a8f52d7cb44b8
- Parents:
- 47a8626627fa6ec583d0e0d8c844f3fdce6e2930
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-03-22 10:21:59+01:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:04:08+01:00
- Location:
- libpolys/polys
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/Makefile.am
r47a8626 rf550e86 15 15 templates/p_Procs_Lib.cc \ 16 16 polys0.cc polys1.cc prCopy.cc prCopyTemplate.cc \ 17 kbuckets.cc sbuckets.cc templates/p_Procs.cc 17 kbuckets.cc sbuckets.cc templates/p_Procs.cc weights.cc 18 18 19 19 BUILT_SOURCES = templates/p_Procs.inc … … 28 28 templates/p_Procs_Dynamic.h templates/p_Procs_Impl.h templates/p_Procs_Set.h templates/p_Procs_Static.h \ 29 29 monomials/p_polys.h monomials/polys-impl.h monomials/maps.h polys.h prCopy.h prCopyMacros.h \ 30 kbuckets.h sbuckets.h simpleideals.h 30 kbuckets.h sbuckets.h simpleideals.h weights.h 31 31 32 32 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION -
libpolys/polys/monomials/p_polys.cc
r47a8626 rf550e86 17 17 #include <polys/monomials/p_polys.h> 18 18 #include <polys/monomials/ring.h> 19 #include <polys/weight.h> 19 20 #include <coeffs/longrat.h> 20 21 #include <misc/options.h> … … 3329 3330 return result; 3330 3331 } 3332 /************************************************************** 3333 * 3334 * Jet 3335 * 3336 **************************************************************/ 3337 3338 poly pp_Jet(poly p, int m, const ring R) 3339 { 3340 poly r=NULL; 3341 poly t=NULL; 3342 3343 while (p!=NULL) 3344 { 3345 if (p_Totaldegree(p,R)<=m) 3346 { 3347 if (r==NULL) 3348 r=p_Head(p,R); 3349 else 3350 if (t==NULL) 3351 { 3352 pNext(r)=p_Head(p,R); 3353 t=pNext(r); 3354 } 3355 else 3356 { 3357 pNext(t)=p_Head(p,R); 3358 pIter(t); 3359 } 3360 } 3361 pIter(p); 3362 } 3363 return r; 3364 } 3365 3366 poly p_Jet(poly p, int m,const ring R) 3367 { 3368 poly t=NULL; 3369 3370 while((p!=NULL) && (p_Totaldegree(p,R)>m)) p_LmDelete(&p,R); 3371 if (p==NULL) return NULL; 3372 poly r=p; 3373 while (pNext(p)!=NULL) 3374 { 3375 if (p_Totaldegree(pNext(p),R)>m) 3376 { 3377 p_LmDelete(&pNext(p),R); 3378 } 3379 else 3380 pIter(p); 3381 } 3382 return r; 3383 } 3384 3385 poly pp_JetW(poly p, int m, short *w, const ring R) 3386 { 3387 poly r=NULL; 3388 poly t=NULL; 3389 while (p!=NULL) 3390 { 3391 if (totaldegreeWecart_IV(p,R,w)<=m) 3392 { 3393 if (r==NULL) 3394 r=p_Head(p,R); 3395 else 3396 if (t==NULL) 3397 { 3398 pNext(r)=p_Head(p,R); 3399 t=pNext(r); 3400 } 3401 else 3402 { 3403 pNext(t)=p_Head(p,R); 3404 pIter(t); 3405 } 3406 } 3407 pIter(p); 3408 } 3409 return r; 3410 } 3411 3412 poly p_JetW(poly p, int m, short *w, const ring R) 3413 { 3414 poly t=NULL; 3415 while((p!=NULL) && (totaldegreeWecart_IV(p,R,w)>m)) p_LmDelete(&p,R); 3416 if (p==NULL) return NULL; 3417 poly r=p; 3418 while (pNext(p)!=NULL) 3419 { 3420 if (totaldegreeWecart_IV(pNext(p),R,w)>m) 3421 { 3422 p_LmDelete(&pNext(p),R); 3423 } 3424 else 3425 pIter(p); 3426 } 3427 return r; 3428 } 3331 3429 3332 3430 /*************************************************************** -
libpolys/polys/monomials/p_polys.h
r47a8626 rf550e86 226 226 void p_ShallowDelete(poly *p, const ring r); 227 227 228 228 229 229 230 230 /*************************************************************** … … 1316 1316 return np; 1317 1317 } 1318 // set all exponents l..k to 0, assume exp. k+1..n and 1..l-1 are in 1318 // set all exponents l..k to 0, assume exp. k+1..n and 1..l-1 are in 1319 1319 // different blocks 1320 1320 // set coeff to 1 … … 1817 1817 void p_SetModDeg(intvec *w, ring r); 1818 1818 1819 /*------------ Jet ----------------------------------*/ 1820 poly pp_Jet(poly p, int m, const ring R); 1821 poly p_Jet(poly p, int m,const ring R); 1822 poly pp_JetW(poly p, int m, short *w, const ring R); 1823 poly p_JetW(poly p, int m, short *w, const ring R); 1819 1824 1820 1825 -
libpolys/polys/polys1.cc
r47a8626 rf550e86 33 33 34 34 35 poly ppJet(poly p, int m)36 {37 poly r=NULL;38 poly t=NULL;39 40 while (p!=NULL)41 {42 if (p_Totaldegree(p,currRing)<=m)43 {44 if (r==NULL)45 r=pHead(p);46 else47 if (t==NULL)48 {49 pNext(r)=pHead(p);50 t=pNext(r);51 }52 else53 {54 pNext(t)=pHead(p);55 pIter(t);56 }57 }58 pIter(p);59 }60 return r;61 }62 63 poly pJet(poly p, int m)64 {65 poly t=NULL;66 67 while((p!=NULL) && (p_Totaldegree(p,currRing)>m)) pLmDelete(&p);68 if (p==NULL) return NULL;69 poly r=p;70 while (pNext(p)!=NULL)71 {72 if (p_Totaldegree(pNext(p),currRing)>m)73 {74 pLmDelete(&pNext(p));75 }76 else77 pIter(p);78 }79 return r;80 }81 82 poly ppJetW(poly p, int m, short *w)83 {84 poly r=NULL;85 poly t=NULL;86 while (p!=NULL)87 {88 if (totaldegreeWecart_IV(p,currRing,w)<=m)89 {90 if (r==NULL)91 r=pHead(p);92 else93 if (t==NULL)94 {95 pNext(r)=pHead(p);96 t=pNext(r);97 }98 else99 {100 pNext(t)=pHead(p);101 pIter(t);102 }103 }104 pIter(p);105 }106 return r;107 }108 109 poly pJetW(poly p, int m, short *w)110 {111 while((p!=NULL) && (totaldegreeWecart_IV(p,currRing,w)>m)) pLmDelete(&p);112 if (p==NULL) return NULL;113 poly r=p;114 while (pNext(p)!=NULL)115 {116 if (totaldegreeWecart_IV(pNext(p),currRing,w)>m)117 {118 pLmDelete(&pNext(p));119 }120 else121 pIter(p);122 }123 return r;124 }125 126 35 int pMinDeg(poly p,intvec *w) 127 36 { -
libpolys/polys/weight.h
r47a8626 rf550e86 9 9 /* $Id$ */ 10 10 11 #include <kernel/structs.h> 12 #include <kernel/ring.h> 11 #include <polys/monomials/ring.h> 13 12 14 extern short * ecartWeights;15 extern pFDegProc pFDegOld;16 extern pLDegProc pLDegOld;13 //extern short * ecartWeights; 14 //extern pFDegProc pFDegOld; 15 //extern pLDegProc pLDegOld; 17 16 18 void kEcartWeights(poly sets, int sl, short *eweight);19 BOOLEAN kWeight(leftv res,leftv id);20 BOOLEAN kQHWeight(leftv res,leftv v);21 long maxdegreeWecart(poly p,int *l, ring r = currRing);22 long totaldegreeWecart(poly p, ring r = currRing);17 void kEcartWeights(poly* s, int sl, short *eweight); 18 //BOOLEAN kWeight(leftv res,leftv id); 19 //BOOLEAN kQHWeight(leftv res,leftv v); 20 long maxdegreeWecart(poly p,int *l, ring r); 21 long totaldegreeWecart(poly p, ring r); 23 22 long totaldegreeWecart_IV(poly p, ring r, const short *w); 24 23 … … 30 29 extern "C" double wFunctionalBuch(int *degw, int *lpol, int npol, 31 30 double *rel, double wx, double wNsqr); 32 void wCall(poly sets, int sl, int *x, double wNsqr);31 void wCall(poly* s, int sl, int *x, double wNsqr); 33 32 34 33 #endif
Note: See TracChangeset
for help on using the changeset viewer.