Changeset 645a19 in git for kernel/ideals.cc
- Timestamp:
- Jul 20, 2009, 2:01:13 PM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 195b03db00f5e08ad6a891adcf3a7794a5dd00bf
- Parents:
- 45c67dc7a3eec0097d1ad6ff5635d960cc089937
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
r45c67dc r645a19 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.7 4 2009-06-04 08:14:57 SingularExp $ */4 /* $Id: ideals.cc,v 1.75 2009-07-20 12:00:50 motsak Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 9 9 /* includes */ 10 10 #include "mod2.h" 11 12 #ifndef NDEBUG 13 # define MYTEST 0 14 #else /* ifndef NDEBUG */ 15 # define MYTEST 0 16 #endif /* ifndef NDEBUG */ 17 11 18 #include "structs.h" 12 19 #include "omalloc.h" … … 26 33 27 34 28 #define MYTEST 029 35 30 36 … … 66 72 //#ifndef __OPTIMIZE__ 67 73 // this is mainly for outputting an ideal within the debugger 68 void idShow(ideal id) 69 { 74 void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint) 75 { 76 assume( debugPrint >= 0 ); 77 70 78 if( id == NULL ) 71 79 Print("(NULL)"); … … 73 81 { 74 82 Print("Module of rank %ld,real rank %ld and %d generators.\n", 75 id->rank,idRankFreeModule(id),IDELEMS(id));76 for (int i=0;i<id->ncols*id->nrows;i++) 77 {78 if (id->m[i]!=NULL)79 {80 Print("generator %d: ",i);pWrite(id->m[i]);81 }83 id->rank,idRankFreeModule(id, lmRing, tailRing),IDELEMS(id)); 84 85 int j = (id->ncols*id->nrows) - 1; 86 while ((j > 0) && (id->m[j]==NULL)) j--; 87 for (int i = 0; i <= j; i++) 88 { 89 Print("generator %d: ",i); p_DebugPrint(id->m[i], lmRing, tailRing, debugPrint); 82 90 } 83 91 } … … 1323 1331 Print("Prepare::h2: "); 1324 1332 idPrint(h2); 1333 1334 for(j=0;j<IDELEMS(h2);j++) pTest(h2->m[j]); 1335 1325 1336 #endif 1326 1337 #endif … … 1356 1367 #endif 1357 1368 1369 idTest(h2); 1358 1370 1359 1371 h3 = kStd(h2,currQuotient,hom,w,NULL,syzcomp); 1372 1373 #if MYTEST 1374 #ifdef RDEBUG 1375 Print("Prepare::Output: "); 1376 idPrint(h3); 1377 for(j=0;j<IDELEMS(h2);j++) pTest(h3->m[j]); 1378 #endif 1379 #endif 1380 1381 1360 1382 idDelete(&h2); 1361 1383 return h3; … … 1377 1399 int ii, idElemens_h1; 1378 1400 1401 assume(h1 != NULL); 1402 1379 1403 idElemens_h1=IDELEMS(h1); 1380 1404 #ifdef PDEBUG … … 1412 1436 } 1413 1437 1414 ideal s_h3=idPrepare(s_h1,h,k,w); 1438 idTest(s_h1); 1439 1440 ideal s_h3=idPrepare(s_h1,h,k,w); // main (syz) GB computation 1415 1441 1416 1442 if (s_h3==NULL) … … 1589 1615 #if MYTEST 1590 1616 #ifdef RDEBUG 1591 Print(" Input: ");1617 Print("idLiftStd Input: "); 1592 1618 idPrint(s_h1); 1593 1619 #endif … … 1599 1625 #if MYTEST 1600 1626 #ifdef RDEBUG 1601 Print(" Prepare: ");1627 Print("idLiftStd Prepare: "); 1602 1628 idPrint(s_h3); 1603 1629 #endif … … 1608 1634 #if MYTEST 1609 1635 #ifdef RDEBUG 1610 Print(" Temp: ");1636 Print("idLiftStd Temp: "); 1611 1637 idPrint(s_h2); 1612 1638 #endif … … 1646 1672 #if MYTEST 1647 1673 #ifdef RDEBUG 1648 Print(" Input'': ");1674 Print("idLiftStd Input'': "); 1649 1675 idPrint(s_h3); 1650 1676 #endif … … 1656 1682 #if MYTEST 1657 1683 #ifdef RDEBUG 1658 Print(" Temp Result: ");1684 Print("idLiftStd Temp Result: "); 1659 1685 idPrint(s_h2); 1660 1686 #endif … … 1701 1727 #if MYTEST 1702 1728 #ifdef RDEBUG 1703 Print(" Output STD Ideal: ");1729 Print("idLiftStd Output STD Ideal: "); 1704 1730 idPrint(s_h3); 1705 1731 1706 Print(" Output Matrix: ");1732 Print("idLiftStd Output Matrix: "); 1707 1733 iiWriteMatrix(*ma, "ma", 2, 4); 1708 1734 #endif
Note: See TracChangeset
for help on using the changeset viewer.