Changeset f13c85 in git
- Timestamp:
- May 28, 2015, 2:12:00 PM (8 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 75fdcae64006ce0ba10e3d881e761f661f4fc9ea
- Parents:
- 9750e3ed7db2557ee2bc1ca59771e04ecff78d78
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
r9750e3 rf13c85 68 68 #include <math.h> 69 69 #include <ctype.h> 70 #include <algorithm>71 70 72 71 // define this if you want to use the fast_map routine for mapping ideals … … 782 781 { 783 782 v->rtyp=IDEAL_CMD; 784 785 char *tmp = (char*)1; 786 std::swap(tmp, theMap->preimage); // map gets 1 as its rank (as an ideal) 787 v->data=fast_map(IDIDEAL(w), src_ring, (ideal)theMap, currRing); // FIXME: this dirty hack from original Singular! 788 std::swap(tmp, theMap->preimage); // map gets its preimage back 789 assume( tmp == (char*)1 ); 790 783 char *tmp = theMap->preimage; 784 theMap->preimage=(char*)1L; 785 // map gets 1 as its rank (as an ideal) 786 v->data=fast_map(IDIDEAL(w), src_ring, (ideal)theMap, currRing); 787 theMap->preimage=tmp; // map gets its preimage back 791 788 } 792 789 else -
Singular/maps_ip.cc
r9750e3 rf13c85 43 43 #include <polys/monomials/maps.h> 44 44 #endif 45 46 #include <algorithm>47 45 48 46 /*2 … … 392 390 ideal src_id=idInit(1,1); 393 391 src_id->m[0]=p; 394 395 char *tmp = (char*)1; 396 std::swap(tmp, theMap->preimage); // map gets 1 as its rank (as an ideal) 397 ideal res_id=fast_map(src_id,currRing,(ideal)theMap,currRing); // FIXME: this dirty hack from original Singular! 398 std::swap(tmp, theMap->preimage); // map gets its preimage back 399 assume( tmp == (char*)1 ); 400 392 393 char *tmp = theMap->preimage; 394 theMap->preimagei=(char*)1L; // map gets 1 as its rank (as an ideal) 395 ideal res_id=fast_map(src_id,currRing,(ideal)theMap,currRing); 396 theMap->preimage=tmp; // map gets its preimage back 397 401 398 res=res_id->m[0]; 402 399 res_id->m[0]=NULL; idDelete(&res_id); -
kernel/combinatorics/hdegree.cc
r9750e3 rf13c85 74 74 id_Test(S, currRing); 75 75 if( Q!=NULL ) id_Test(Q, currRing); 76 76 77 77 int mc; 78 78 hexist = hInit(S, Q, &hNexist, currRing); … … 214 214 id_Test(S, currRing); 215 215 if( Q!=NULL ) id_Test(Q, currRing); 216 216 217 217 intvec *Set=new intvec((currRing->N)); 218 218 int mc,i; … … 700 700 id_Test(S, currRing); 701 701 if( Q!=NULL ) id_Test(Q, currRing); 702 702 703 703 int di; 704 704 int mc; … … 801 801 id_Test(S, currRing); 802 802 if( Q!=NULL ) id_Test(Q, currRing); 803 803 804 804 hDegree(S, Q); 805 805 return hMu; … … 824 824 id_Test(S, currRing); 825 825 if( Q!=NULL ) id_Test(Q, currRing); 826 826 827 827 int co, mu, l; 828 828 intvec *hseries2; … … 921 921 id_TestTail(S, currRing, tailRing); 922 922 if (Q!=NULL) id_TestTail(Q, currRing, tailRing); 923 923 924 924 hDegree0(S, Q, tailRing); 925 925 return hMu; … … 1007 1007 id_TestTail(S, currRing, tailRing); 1008 1008 if (Q!=NULL) id_TestTail(Q, currRing, tailRing); 1009 1009 1010 1010 int i; 1011 1011 int k = ak; … … 1341 1341 { 1342 1342 if( Q!=NULL) id_Test(Q, currRing); 1343 1343 1344 1344 int i, di; 1345 1345 poly p; -
kernel/combinatorics/hilb.cc
r9750e3 rf13c85 1299 1299 intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing) 1300 1300 { 1301 id_TestTail(S, currRing, tailRing); 1301 id_TestTail(S, currRing, tailRing); 1302 1302 if (Q!= NULL) id_TestTail(Q, currRing, tailRing); 1303 1303 1304 1304 return hSeries(S, modulweight, 1, wdegree, Q, tailRing); 1305 1305 } -
kernel/ideals.cc
r9750e3 rf13c85 1788 1788 ideal idMinors(matrix a, int ar, ideal R) 1789 1789 { 1790 1790 1791 1791 const ring origR=currRing; 1792 1792 id_Test((ideal)a, origR); … … 1794 1794 const int r = a->nrows; 1795 1795 const int c = a->ncols; 1796 1796 1797 1797 if((ar<=0) || (ar>r) || (ar>c)) 1798 1798 { … … 1800 1800 return NULL; 1801 1801 } 1802 1803 ideal h = id_Matrix2Module(mp_Copy(a,origR),origR); 1802 1803 ideal h = id_Matrix2Module(mp_Copy(a,origR),origR); 1804 1804 long bound = sm_ExpBound(h,c,r,ar,origR); 1805 1805 id_Delete(&h, origR); 1806 1806 1807 1807 ring tmpR = sm_RingChange(origR,bound); 1808 1808 1809 1809 matrix b = mpNew(r,c); 1810 1810 1811 1811 for (int i=r*c-1;i>=0;i--) 1812 1812 if (a->m[i] != NULL) 1813 1813 b->m[i] = prCopyR(a->m[i],origR,tmpR); 1814 1814 1815 1815 id_Test( (ideal)b, tmpR); 1816 1816 1817 1817 if (R!=NULL) 1818 1818 { … … 1826 1826 id_Test( R, tmpR); 1827 1827 } 1828 1829 1828 1829 1830 1830 ideal result = idInit(32,1); 1831 1831 1832 1832 int elems = 0; 1833 1833 1834 1834 if(ar>1) 1835 1835 mp_RecMin(ar-1,result,elems,b,r,c,NULL,R,tmpR); 1836 1836 else 1837 1837 mp_MinorToResult(result,elems,b,r,c,R,tmpR); 1838 1838 1839 1839 id_Test( (ideal)b, tmpR); 1840 1840 1841 1841 id_Delete((ideal *)&b, tmpR); 1842 1842 1843 1843 if (R!=NULL) idDelete(&R); 1844 1844 1845 1845 idSkipZeroes(result); 1846 1846 rChangeCurrRing(origR); -
kernel/preimage.h
r9750e3 rf13c85 2 2 #define KERNEL_PREIMAGE_H 3 3 4 struct ip_sring; typedef struct ip_sring * ring; 5 struct sip_sideal; typedef struct sip_sideal * ideal; 6 struct sip_smap; typedef struct sip_smap * map; 4 #include <polys/monomials/ring.h> 7 5 8 6 ideal maGetPreimage(ring theImageRing, map theMap, ideal id, const ring dst_r); -
libpolys/polys/monomials/maps.h
r9750e3 rf13c85 9 9 #include <coeffs/coeffs.h> 10 10 #include <polys/monomials/ring.h> 11 //#include <polys/simpleideals.h>12 13 struct sip_smap; typedef struct sip_smap * map;14 11 15 12 // poly maEval(map theMap, poly p, ring dst_ring, nMapFunc nMap, ideal s=NULL); -
libpolys/polys/simpleideals.h
r9750e3 rf13c85 43 43 }; 44 44 45 typedef struct sip_smap * map;45 //typedef struct sip_smap * map; 46 46 47 47 struct sideal_list;
Note: See TracChangeset
for help on using the changeset viewer.