Changeset 25003c in git for Singular/syz.cc
- Timestamp:
- Apr 29, 1998, 9:05:32 AM (26 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 78ed39468e4c15713f8fffc0ca2afb422840e509
- Parents:
- fda59838bf7766c167e43fc1566967f60c60783f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/syz.cc
rfda5983 r25003c 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: syz.cc,v 1. 8 1998-01-17 18:08:00 SingularExp $ */4 /* $Id: syz.cc,v 1.9 1998-04-29 07:05:30 siebert Exp $ */ 5 5 6 6 /* … … 391 391 } 392 392 393 syStrategy syResolution(ideal arg, int maxlength,intvec * w, BOOLEAN minim) 394 { 395 int typ0; 396 syStrategy result=(syStrategy)Alloc0(sizeof(ssyStrategy)); 397 398 if (w!=NULL) 399 { 400 result->weights = (intvec**)Alloc0(sizeof(intvec*)); 401 (result->weights)[0] = ivCopy(w); 402 result->length = 1; 403 } 404 resolvente fr = syResolvente(arg,maxlength,&(result->length),&(result->weights),minim),fr1; 405 if (minim) 406 { 407 result->minres = (resolvente)Alloc0((result->length+1)*sizeof(ideal)); 408 fr1 = result->minres; 409 } 410 else 411 { 412 result->fullres = (resolvente)Alloc0((result->length+1)*sizeof(ideal)); 413 fr1 = result->fullres; 414 } 415 for (int i=result->length-1;i>=0;i--) 416 { 417 if (fr[i]!=NULL) 418 fr1[i] = fr[i]; 419 fr[i] = NULL; 420 } 421 Free((ADDRESS)fr,(result->length)*sizeof(ideal)); 422 return result; 423 } 424 425 393 426 resolvente syMinRes(ideal arg, int maxlength, int * length, BOOLEAN minim) 394 427 { … … 676 709 cols--; 677 710 } 711 intvec * result; 712 if (idIs0(res[0])) 713 { 714 if (res[0]==NULL) 715 result = new intvec(1,1,1); 716 else 717 result = new intvec(1,1,res[0]->rank); 718 return result; 719 } 678 720 l = max(idRankFreeModule(res[0]),res[0]->rank); 679 721 i = 0; … … 713 755 } 714 756 /*------ computation betti numbers --------------*/ 715 intvec *result = new intvec(rows,cols,0);757 result = new intvec(rows,cols,0); 716 758 (*result)[0] = /*idRankFreeModule(res[0])*/ res[0]->rank; 717 759 if ((!idIs0(res[0])) && ((*result)[0]==0)) (*result)[0] = 1;
Note: See TracChangeset
for help on using the changeset viewer.