Changeset 60d1183 in git for kernel/ideals.cc
 Timestamp:
 Feb 1, 2008, 2:45:37 PM (15 years ago)
 Branches:
 (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
 Children:
 935bb1bf1fc7cf6828861ed659dcc18157c72dd3
 Parents:
 31e857fefc0db942580fac2470cb89c397ef32a8
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/ideals.cc
r31e857 r60d1183 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.4 5 20070614 14:56:40Singular Exp $ */4 /* $Id: ideals.cc,v 1.46 20080201 13:45:37 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT  all basic methods to manipulate ideals … … 1029 1029 ideal idSect (ideal h1,ideal h2) 1030 1030 { 1031 ideal first=h2,second=h1,temp,temp1,result; 1032 int i,j,k,flength,slength,length,rank=si_min(h1>rank,h2>rank); 1031 int i,j,k,length; 1032 int flength = idRankFreeModule(h1); 1033 int slength = idRankFreeModule(h2); 1034 int rank=si_min(flength,slength); 1035 if ((idIs0(h1))  (idIs0(h2))) return idInit(1,rank); 1036 1037 ideal first,second,temp,temp1,result; 1033 1038 intvec *w; 1034 1039 poly p,q; 1035 1040 1036 if ((idIs0(h1)) && (idIs0(h2))) return idInit(1,rank);1037 1041 if (IDELEMS(h1)<IDELEMS(h2)) 1038 1042 { … … 1040 1044 second = h2; 1041 1045 } 1042 flength = idRankFreeModule(first); 1043 slength = idRankFreeModule(second); 1046 else 1047 { 1048 first = h2; 1049 second = h1; 1050 int t=flength; flength=slength; slength=t; 1051 } 1044 1052 length = si_max(flength,slength); 1045 1053 if (length==0) … … 1048 1056 } 1049 1057 j = IDELEMS(first); 1050 temp = idInit(j /*IDELEMS(first)*/,length+j);1051 1058 1052 1059 ring orig_ring=currRing; … … 1055 1062 1056 1063 while ((j>0) && (first>m[j1]==NULL)) j; 1064 temp = idInit(j /*IDELEMS(first)*/+IDELEMS(second),length+j); 1057 1065 k = 0; 1058 1066 for (i=0;i<j;i++) … … 1074 1082 } 1075 1083 } 1076 pEnlargeSet(&(temp>m),IDELEMS(temp),j+IDELEMS(second)IDELEMS(temp));1077 IDELEMS(temp) = j+IDELEMS(second);1078 1084 for (i=0;i<IDELEMS(second);i++) 1079 1085 { … … 1103 1109 { 1104 1110 if(syz_ring==orig_ring) 1105 p = pCopy(temp1>m[i]); 1111 { 1112 p = temp1>m[i]; 1113 } 1106 1114 else 1107 p = prCopyR(temp1>m[i], syz_ring); 1115 { 1116 p = prMoveR(temp1>m[i], syz_ring); 1117 } 1118 temp1>m[i]=NULL; 1108 1119 while (p!=NULL) 1109 1120 {
Note: See TracChangeset
for help on using the changeset viewer.