Changeset 0917a96 in git
- Timestamp:
- Feb 22, 2012, 8:36:43 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 227b7e3065d77cffc07256095d57a99efcf9d4a3
- Parents:
- 860bce8d6f180df9bfb84d6dcde47a7e75486741
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-22 20:36:43+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-23 20:35:10+01:00
- Location:
- dyn_modules/syzextra
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
dyn_modules/syzextra/DebugPrint.cc
r860bce r0917a96 22 22 23 23 #include <omalloc/omalloc.h> 24 #include <polys/monomials/p_polys.h> 25 24 26 #include <kernel/febase.h> 25 #include <kernel/p_polys.h>26 27 #include <kernel/ideals.h> 27 28 … … 87 88 { 88 89 Print("Module of rank %ld,real rank %ld and %d generators.\n", 89 id->rank,id RankFreeModule(id, lmRing, tailRing),IDELEMS(id));90 id->rank,id_RankFreeModule(id, lmRing, tailRing),IDELEMS(id)); 90 91 91 92 int j = (id->ncols*id->nrows) - 1; -
dyn_modules/syzextra/DebugPrint.h
r860bce r0917a96 21 21 // include basic definitions 22 22 #include "singularxx_defs.h" 23 #include <kernel/ ring.h>23 #include <kernel/polys.h> 24 24 25 25 BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(DEBUG) 26 27 26 28 27 29 /// debug-print at most nTerms (2 by default) terms from poly/vector p, -
dyn_modules/syzextra/mod_main.cc
r860bce r0917a96 3 3 #include <omalloc/omalloc.h> 4 4 5 #include <misc/intvec.h> 6 7 #include <coeffs/coeffs.h> 8 9 #include <polys/monomials/p_polys.h> 10 #include <polys/monomials/ring.h> 11 // #include <kernel/longrat.h> 12 #include <kernel/kstd1.h> 13 14 #include <kernel/polys.h> 15 5 16 #include <kernel/syz.h> 6 #include <kernel/intvec.h>7 #include <kernel/p_polys.h>8 #include <kernel/longrat.h>9 #include <kernel/kstd1.h>10 11 #include <kernel/polys.h>12 17 13 18 #include <Singular/tok.h> … … 16 21 #include <Singular/attrib.h> 17 22 23 #include <Singular/ipid.h> 24 // extern coeffs coeffs_BIGINT 25 18 26 #include "singularxx_defs.h" 19 27 #include "DebugPrint.h" 20 28 #include "myNF.h" 21 29 22 23 24 extern void rSetISReference(const ideal F, const int rank, const int p, const intvec * componentWeights, const ring r);30 extern BOOLEAN rSetISReference(const ring r, const ideal F, const int i, const int p, const intvec * componentWeights); 31 32 // extern void rSetISReference(const ideal F, const int rank, const int p, const intvec * componentWeights, const ring r); 25 33 extern void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r); 26 extern ring rCurrRingAssure_SyzComp();34 // extern ring rCurrRingAssure_SyzComp(); 27 35 extern ring rAssure_InducedSchreyerOrdering(const ring r, BOOLEAN complete, int sign); 28 36 extern int rGetISPos(const int p, const ring r); … … 63 71 64 72 65 66 73 static inline number jjLONG2N(long d) 67 74 { 68 #if SIZEOF_LONG == 8 69 int i=(int)d; 70 if ((long)i == d) 71 return nlInit(i, NULL); 72 else 73 { 74 # if !defined(OM_NDEBUG) && !defined(NDEBUG) 75 omCheckBin(rnumber_bin); 76 # endif 77 number z=(number)omAllocBin(rnumber_bin); 78 # if defined(LDEBUG) 79 z->debug=123456; 80 # endif 81 z->s=3; 82 mpz_init_set_si(z->z,d); 83 return z; 84 } 85 #else 86 return nlInit((int)d, NULL); 87 #endif 75 return n_Init(d, coeffs_BIGINT); 88 76 } 89 77 … … 223 211 { \ 224 212 /* const ring rrr = (iLevel > 0) ? save : save; */ \ 225 Print("id '%10s'[%d]: (%p) ncols = %d / size: %d; nrows = %d, rank = %ld / rk: %ld", #v, iLevel, reinterpret_cast<const void*>(((s)->v)[iLevel]), ((s)->v)[iLevel]->ncols, idSize(((s)->v)[iLevel]), ((s)->v)[iLevel]->nrows, ((s)->v)[iLevel]->rank, -1L/*id RankFreeModule(((s)->v)[iLevel], rrr)*/ ); \213 Print("id '%10s'[%d]: (%p) ncols = %d / size: %d; nrows = %d, rank = %ld / rk: %ld", #v, iLevel, reinterpret_cast<const void*>(((s)->v)[iLevel]), ((s)->v)[iLevel]->ncols, idSize(((s)->v)[iLevel]), ((s)->v)[iLevel]->nrows, ((s)->v)[iLevel]->rank, -1L/*id_RankFreeModule(((s)->v)[iLevel], rrr)*/ ); \ 226 214 PrintLn(); \ 227 215 } \ … … 232 220 PRINT_RESOLUTION(syzstr, fullres); 233 221 234 assume (id RankFreeModule (syzstr->res[1], rr) == syzstr->res[1]->rank);222 assume (id_RankFreeModule (syzstr->res[1], rr) == syzstr->res[1]->rank); 235 223 236 224 PRINT_RESOLUTION(syzstr, res); … … 426 414 427 415 // res->data = rCurrRingAssure_SyzComp(); // changes current ring! :( 428 res->data = reinterpret_cast<void *>(r CurrRingAssure_SyzComp());416 res->data = reinterpret_cast<void *>(rAssure_SyzComp(currRing, TRUE)); 429 417 res->rtyp = RING_CMD; // return new ring! 430 418 // QRING_CMD? … … 482 470 const int iSyzComp = (int)reinterpret_cast<long>(h->Data()); 483 471 assume( iSyzComp > 0 ); 484 rSetSyzComp( iSyzComp);472 rSetSyzComp(iSyzComp, currRing); 485 473 } 486 474 … … 530 518 531 519 // Print("before: %d\n", FF->nrows); 532 // FF->nrows = id RankFreeModule(FF, r); // ???520 // FF->nrows = id_RankFreeModule(FF, r); // ??? 533 521 // Print("after: %d\n", FF->nrows); 534 522 } … … 572 560 assume(rank >= 0); 573 561 } else 574 rank = id RankFreeModule(F, r); // Starting syz-comp (1st: i+1)562 rank = id_RankFreeModule(F, r); // Starting syz-comp (1st: i+1) 575 563 576 564 int p = 0; // which IS-block? p^th! … … 593 581 594 582 // F & componentWeights belong to that ordering block of currRing now: 595 rSetISReference( F, rank, p, componentWeights, r); // F and componentWeights will be copied!583 rSetISReference(r, F, rank, p, componentWeights); // F and componentWeights will be copied! 596 584 return FALSE; 597 585 } … … 712 700 iComp = rGetCurrSyzLimit(r); 713 701 else 714 iComp = id RankFreeModule(r->typ[posIS].data.is.F, r); // ;702 iComp = id_RankFreeModule(r->typ[posIS].data.is.F, r); // ; 715 703 } 716 704 -
dyn_modules/syzextra/myNF.cc
r860bce r0917a96 19 19 #include <kernel/mod2.h> 20 20 21 #include "myNF.h"22 21 23 22 #include <omalloc/omalloc.h> 23 24 #include <misc/intvec.h> 25 26 #include <misc/options.h> 27 28 #include <polys/monomials/p_polys.h> 29 #include <polys/kbuckets.h> 30 31 24 32 #include <kernel/structs.h> 25 33 #include <kernel/febase.h> … … 30 38 31 39 #include <kernel/syz.h> 32 #include <kernel/longrat.h>40 // #include <kernel/longrat.h> 33 41 #include <kernel/kutil.h> 34 42 #include <kernel/kstd1.h> 35 #include <kernel/options.h> 36 37 #include <kernel/kbuckets.h> 38 39 #include <kernel/intvec.h> 40 #include <kernel/p_polys.h> 43 44 45 41 46 #include <kernel/polys.h> 42 #include <kernel/pInline2.h> 47 // #include <kernel/pInline2.h> 48 49 #include "myNF.h" 43 50 44 51 … … 46 53 #define PLURAL_INTERNAL_DECLARATIONS 1 47 54 #endif 48 #include <kernel/gring.h> 49 #include <kernel/sca.h> 55 56 #include <polys/nc/sca.h> 57 #include <polys/nc/nc.h> 58 #include <kernel/nc.h> 50 59 51 60 … … 214 223 //if ((idIs0(F))&&(Q==NULL)) 215 224 // return pCopy(q); /*F=0*/ 216 //strat->ak = id RankFreeModule(F);225 //strat->ak = id_RankFreeModule(F, RING!); 217 226 /*- creating temp data structures------------------- -*/ 218 227 BITSET save_test=test; … … 245 254 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 246 255 #ifdef HAVE_RINGS 247 if (rField_is_Ring( ))256 if (rField_is_Ring(currRing)) 248 257 { 249 258 p = redtailBba_Z(p,max_ind,strat); … … 309 318 kStrategy strat=new skStrategy; 310 319 strat->syzComp = syzComp; 311 strat->ak = si_max(id RankFreeModule(F),pMaxComp(p));320 strat->ak = si_max(id_RankFreeModule(F, currRing),pMaxComp(p)); 312 321 poly res; 313 322 314 if ( pOrdSgn==-1)323 if (rHasLocalOrMixedOrdering(currRing)==-1) 315 324 res=kNF1(F,Q,pp,strat,lazyReduce); 316 325 else -
dyn_modules/syzextra/myNF.h
r860bce r0917a96 21 21 // include basic definitions 22 22 #include "singularxx_defs.h" 23 #include <kernel/ring.h> 24 #include <kernel/ideals.h> 23 24 struct spolyrec; 25 typedef struct spolyrec polyrec; 26 typedef polyrec * poly; 27 28 struct ip_sring; 29 typedef struct ip_sring * ring; 30 31 struct sip_sideal; 32 typedef struct sip_sideal * ideal; 25 33 26 34 BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(NF) -
dyn_modules/syzextra/noro.sing
r860bce r0917a96 673 673 number t = (ttN - tN); 674 674 number tt = ((ttS - tS) + (ttG - tG)); 675 "Factor: ", t /tt;676 "Factor: ", (ttN - tN) /((ttS - tS) + (ttG - tG));675 "Factor: ", t div tt; 676 "Factor: ", (ttN - tN) div ((ttS - tS) + (ttG - tG)); 677 677 678 678 -
dyn_modules/syzextra/syzextra.tst
r860bce r0917a96 30 30 31 31 vector v =3 *xyz * [0, 0, 1, x, y, z]; 32 33 32 v; 34 33 DetailedPrint(v, 2); 35 34 36 leadmonom(v); 37 leadcomp(v); 35 leadmonom(v);leadcomp(v); 38 36 leadrawexp(v); 39 37
Note: See TracChangeset
for help on using the changeset viewer.