Changeset 3449c9b in git
 Timestamp:
 Jun 24, 2009, 9:33:24 AM (14 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
 Children:
 982b3040ec54e63486a07d530e4682e6ec9773c0
 Parents:
 b7510d84a58f2775dda55d9ba42db39af568e61b
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/gfan.cc
rb7510d r3449c9b 1 1 /* 2 2 Compute the Groebner fan of an ideal 3 $Author: monerjan$4 $Date: 2009062 3 16:21:07$5 $Header: /exports/cvsroot2/cvsroot/kernel/gfan.cc,v 1.6 5 20090623 16:21:07 monerjanExp $6 $Id: gfan.cc,v 1.6 5 20090623 16:21:07 monerjanExp $3 $Author: Singular $ 4 $Date: 20090624 07:33:24 $ 5 $Header: /exports/cvsroot2/cvsroot/kernel/gfan.cc,v 1.66 20090624 07:33:24 Singular Exp $ 6 $Id: gfan.cc,v 1.66 20090624 07:33:24 Singular Exp $ 7 7 */ 8 8 … … 877 877 //intvec *negfNormal = new intvec(this>numVars); 878 878 //negfNormal=ivNeg(fNormal); 879 if( (srcRing>order[0]==ringorder_dp) 880  (srcRing>order[0]==ringorder_Dp) 881  (srcRing>order[0]==ringorder_ds) 882  (srcRing>order[0]==ringorder_ls) ) 879 if( (srcRing>order[0]!=ringorder_a) 883 880 { 884 881 tmpRing=rCopyAndAddWeight(srcRing,ivNeg(fNormal)); … … 888 885 tmpRing=rCopy0(srcRing); 889 886 int length=fNormal>length(); 890 int *A=(int *)omAlloc (length*sizeof(int));887 int *A=(int *)omAlloc0(length*sizeof(int)); 891 888 for(int jj=0;jj<length;jj++) 892 889 { 893 890 A[jj]=(*fNormal)[jj]; 894 891 } 892 omFree(tmpRing>wvhdl[0]); 895 893 tmpRing>wvhdl[0]=(int*)A; 894 tmpRing>block1[0]=length; 896 895 rComplete(tmpRing); 897 896 } … … 1389 1388 ring rCopyAndAddWeight(ring const &r, intvec const *ivw) 1390 1389 { 1391 ring res=(ring)omAllocBin(ip_sring_bin); 1392 memcpy4(res,r,sizeof(ip_sring)); 1393 res>VarOffset = NULL; 1394 res>ref=0; 1395 1396 if (r>algring!=NULL) 1397 r>algring>ref++; 1398 if (r>parameter!=NULL) 1399 { 1400 res>minpoly=nCopy(r>minpoly); 1401 int l=rPar(r); 1402 res>parameter=(char **)omAlloc(l*sizeof(char_ptr)); 1403 int i; 1404 for(i=0;i<rPar(r);i++) 1405 { 1406 res>parameter[i]=omStrDup(r>parameter[i]); 1407 } 1408 } 1409 1410 int i=rBlocks(r); 1390 ring res=rCopy0(r); 1411 1391 int jj; 1412 1392 1413 res>order =(int *)omAlloc((i+1)*sizeof(int)); 1414 res>block0=(int *)omAlloc((i+1)*sizeof(int)); 1415 res>block1=(int *)omAlloc((i+1)*sizeof(int)); 1416 res>wvhdl =(int **)omAlloc((i+1)*sizeof(int**)); 1417 for(jj=0;jj<i;jj++) 1418 { 1419 if (r>wvhdl[jj] != NULL) 1420 { 1421 res>wvhdl[jj] = (int*) omMemDup(r>wvhdl[jj1]); 1422 } 1423 else 1424 { 1425 res>wvhdl[jj+1]=NULL; 1426 } 1427 } 1428 1429 for (jj=0;jj<i;jj++) 1430 { 1431 res>order[jj+1]=r>order[jj]; 1432 res>block0[jj+1]=r>block0[jj]; 1433 res>block1[jj+1]=r>block1[jj]; 1434 } 1393 omFree(res>order); 1394 res>order =(int *)omAlloc0(4*sizeof(int)); 1395 omFree(res>block0); 1396 res>block0=(int *)omAlloc0(4*sizeof(int)); 1397 omFree(res>block1); 1398 res>block1=(int *)omAlloc0(4*sizeof(int)); 1399 omfree(res>wvhdl); 1400 res>wvhdl =(int **)omAlloc0(4*sizeof(int**)); 1435 1401 1436 1402 res>order[0]=ringorder_a; 1403 res>block0[0]=1; 1404 res>block1[0]=res>N;; 1437 1405 res>order[1]=ringorder_dp; //basically useless, since that should never be used 1406 res>block0[1]=1; 1407 res>block1[1]=res>N;; 1408 res>order[2]=ringorder_C; 1409 1438 1410 int length=ivw>length(); 1439 int *A=(int *)omAlloc (length*sizeof(int));1411 int *A=(int *)omAlloc0(length*sizeof(int)); 1440 1412 for (jj=0;jj<length;jj++) 1441 1413 { … … 1443 1415 } 1444 1416 res>wvhdl[0]=(int *)A; 1445 res>block0[0]=1;1446 1417 res>block1[0]=length; 1447 1418 1448 res>names = (char **)omAlloc0(rVar(r) * sizeof(char_ptr));1449 for (i=rVar(res)1;i>=0; i)1450 {1451 res>names[i] = omStrDup(r>names[i]);1452 }1453 1419 rComplete(res); 1454 1420 return res;
Note: See TracChangeset
for help on using the changeset viewer.