Changeset 8d1bbc in git
- Timestamp:
- Mar 11, 2003, 5:58:40 PM (21 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- b6dc9500ecc2dc3c85b0a7d208b4a304e83e9323
- Parents:
- a5739138d818d3730f932843572d0e89246c6229
- Location:
- Singular
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/hdegree.cc
ra57391 r8d1bbc 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: hdegree.cc,v 1.2 4 2001-01-18 16:21:14Singular Exp $ */4 /* $Id: hdegree.cc,v 1.25 2003-03-11 16:45:25 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - dimension, multiplicity, HC, kbase … … 73 73 int scDimInt(ideal S, ideal Q) 74 74 { 75 Exponent_t mc;75 int mc; 76 76 hexist = hInit(S, Q, &hNexist); 77 77 if (!hNexist) … … 79 79 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 80 80 hvar = (varset)omAlloc((pVariables + 1) * sizeof(int)); 81 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof( Exponent_t));81 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof(int)); 82 82 mc = hisModule; 83 83 if (!mc) … … 101 101 if (hNvar) 102 102 { 103 memset(hpure, 0, (pVariables + 1) * sizeof( Exponent_t));103 memset(hpure, 0, (pVariables + 1) * sizeof(int)); 104 104 hPure(hrad, 0, &hNrad, hvar, hNvar, hpure, &hNpure); 105 105 hLexR(hrad, hNrad, hvar, hNvar); … … 117 117 } 118 118 hKill(radmem, pVariables - 1); 119 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof( Exponent_t));119 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof(int)); 120 120 omFreeSize((ADDRESS)hvar, (pVariables + 1) * sizeof(int)); 121 121 omFreeSize((ADDRESS)hwork, hNexist * sizeof(scmon)); … … 211 211 { 212 212 intvec *Set=new intvec(pVariables); 213 Exponent_t mc,i;213 int mc,i; 214 214 hexist = hInit(S, Q, &hNexist); 215 215 if (hNexist==0) … … 221 221 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 222 222 hvar = (varset)omAlloc((pVariables + 1) * sizeof(int)); 223 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof( Exponent_t));224 hInd = (scmon)omAlloc((1 + pVariables) * sizeof( Exponent_t));223 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof(int)); 224 hInd = (scmon)omAlloc((1 + pVariables) * sizeof(int)); 225 225 mc = hisModule; 226 226 if (mc==0) … … 244 244 if (hNvar!=0) 245 245 { 246 memset(hpure, 0, (pVariables + 1) * sizeof( Exponent_t));246 memset(hpure, 0, (pVariables + 1) * sizeof(int)); 247 247 hPure(hrad, 0, &hNrad, hvar, hNvar, hpure, &hNpure); 248 248 hLexR(hrad, hNrad, hvar, hNvar); … … 262 262 (*Set)[i] = hInd[i+1]; 263 263 hKill(radmem, pVariables - 1); 264 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof( Exponent_t));265 omFreeSize((ADDRESS)hInd, (1 + pVariables) * sizeof( Exponent_t));264 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof(int)); 265 omFreeSize((ADDRESS)hInd, (1 + pVariables) * sizeof(int)); 266 266 omFreeSize((ADDRESS)hvar, (pVariables + 1) * sizeof(int)); 267 267 omFreeSize((ADDRESS)hwork, hNexist * sizeof(scmon)); … … 560 560 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 561 561 hvar = (varset)omAlloc((pVariables + 1) * sizeof(int)); 562 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof( Exponent_t));562 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof(int)); 563 563 hrad = hexist; 564 564 hNrad = hNexist; … … 571 571 { 572 572 hCo = hNvar; 573 memset(hpure, 0, (pVariables + 1) * sizeof( Exponent_t));573 memset(hpure, 0, (pVariables + 1) * sizeof(int)); 574 574 hPure(hrad, 0, &hNrad, hvar, hNvar, hpure, &hNpure); 575 575 hLexR(hrad, hNrad, hvar, hNvar); … … 628 628 } 629 629 hKill(radmem, pVariables - 1); 630 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof( Exponent_t));630 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof(int)); 631 631 omFreeSize((ADDRESS)hvar, (pVariables + 1) * sizeof(int)); 632 632 omFreeSize((ADDRESS)hwork, hNexist * sizeof(scmon)); … … 640 640 { 641 641 int iv = Nvar -1, sum, a, a0, a1, b, i; 642 Exponent_t x, x0;642 int x, x0; 643 643 scmon pn; 644 644 scfmon sn; … … 700 700 if ((i0 > 2) && (i > 10)) 701 701 hOrdSupp(hwork, i, sel, i0); 702 memset(hpur0, 0, (pVariables + 1) * sizeof( Exponent_t));702 memset(hpur0, 0, (pVariables + 1) * sizeof(int)); 703 703 hPure(hwork, 0, &i, sel, i0, hpur0, &k); 704 704 hLexS(hwork, i, sel, i0); … … 785 785 { 786 786 int di; 787 Exponent_t mc;787 int mc; 788 788 hexist = hInit(S, Q, &hNexist); 789 789 if (!hNexist) … … 797 797 hvar = (varset)omAlloc((pVariables + 1) * sizeof(int)); 798 798 hsel = (varset)omAlloc((pVariables + 1) * sizeof(int)); 799 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof( Exponent_t));800 hpur0 = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof( Exponent_t));799 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof(int)); 800 hpur0 = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof(int)); 801 801 mc = hisModule; 802 802 hrad = (scfmon)omAlloc(hNexist * sizeof(scmon)); … … 829 829 { 830 830 hCo = hNvar; 831 memset(hpure, 0, (pVariables + 1) * sizeof( Exponent_t));831 memset(hpure, 0, (pVariables + 1) * sizeof(int)); 832 832 hPure(hrad, 0, &hNrad, hvar, hNvar, hpure, &hNpure); 833 833 hLexR(hrad, hNrad, hvar, hNvar); … … 856 856 if ((hNvar > 2) && (hNstc > 10)) 857 857 hOrdSupp(hstc, hNstc, hvar, hNvar); 858 memset(hpur0, 0, (pVariables + 1) * sizeof( Exponent_t));858 memset(hpur0, 0, (pVariables + 1) * sizeof(int)); 859 859 hPure(hstc, 0, &hNstc, hvar, hNvar, hpur0, &hNpure); 860 860 hLexS(hstc, hNstc, hvar, hNvar); … … 869 869 hKill(stcmem, pVariables - 1); 870 870 hKill(radmem, pVariables - 1); 871 omFreeSize((ADDRESS)hpur0, (1 + (pVariables * pVariables)) * sizeof( Exponent_t));872 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof( Exponent_t));871 omFreeSize((ADDRESS)hpur0, (1 + (pVariables * pVariables)) * sizeof(int)); 872 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof(int)); 873 873 omFreeSize((ADDRESS)hsel, (pVariables + 1) * sizeof(int)); 874 874 omFreeSize((ADDRESS)hvar, (pVariables + 1) * sizeof(int)); … … 899 899 static void hDegree0(ideal S, ideal Q) 900 900 { 901 Exponent_t mc;901 int mc; 902 902 hexist = hInit(S, Q, &hNexist); 903 903 if (!hNexist) … … 910 910 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 911 911 hvar = (varset)omAlloc((pVariables + 1) * sizeof(int)); 912 hpur0 = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof( Exponent_t));912 hpur0 = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof(int)); 913 913 mc = hisModule; 914 914 if (!mc) … … 940 940 if ((hNvar > 2) && (hNstc > 10)) 941 941 hOrdSupp(hstc, hNstc, hvar, hNvar); 942 memset(hpur0, 0, (pVariables + 1) * sizeof( Exponent_t));942 memset(hpur0, 0, (pVariables + 1) * sizeof(int)); 943 943 hPure(hstc, 0, &hNstc, hvar, hNvar, hpur0, &hNpure); 944 944 if (hNpure == hNvar) … … 957 957 } 958 958 hKill(stcmem, pVariables - 1); 959 omFreeSize((ADDRESS)hpur0, (1 + (pVariables * pVariables)) * sizeof( Exponent_t));959 omFreeSize((ADDRESS)hpur0, (1 + (pVariables * pVariables)) * sizeof(int)); 960 960 omFreeSize((ADDRESS)hvar, (pVariables + 1) * sizeof(int)); 961 961 omFreeSize((ADDRESS)hwork, hNexist * sizeof(scmon)); … … 992 992 { 993 993 int iv = Nvar -1, k = var[Nvar], a, a0, a1, b, i; 994 Exponent_t x, x0;994 int x, x0; 995 995 scmon pn; 996 996 scfmon sn; … … 1051 1051 { 1052 1052 int i; 1053 Exponent_t k = ak;1053 int k = ak; 1054 1054 hNvar = pVariables; 1055 1055 hexist = hInit(S, Q, &hNexist, tailRing); … … 1060 1060 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 1061 1061 hvar = (varset)omAlloc((hNvar + 1) * sizeof(int)); 1062 hpure = (scmon)omAlloc((1 + (hNvar * hNvar)) * sizeof( Exponent_t));1062 hpure = (scmon)omAlloc((1 + (hNvar * hNvar)) * sizeof(int)); 1063 1063 stcmem = hCreate(hNvar - 1); 1064 1064 for (i = hNvar; i>0; i--) … … 1067 1067 if ((hNvar > 2) && (hNstc > 10)) 1068 1068 hOrdSupp(hexist, hNstc, hvar, hNvar); 1069 memset(hpure, 0, (hNvar + 1) * sizeof( Exponent_t));1069 memset(hpure, 0, (hNvar + 1) * sizeof(int)); 1070 1070 hPure(hexist, 0, &hNstc, hvar, hNvar, hpure, &hNpure); 1071 1071 hLexS(hexist, hNstc, hvar, hNvar); … … 1079 1079 omFreeSize((ADDRESS)hwork, hNexist * sizeof(scmon)); 1080 1080 omFreeSize((ADDRESS)hvar, (hNvar + 1) * sizeof(int)); 1081 omFreeSize((ADDRESS)hpure, (1 + (hNvar * hNvar)) * sizeof( Exponent_t));1081 omFreeSize((ADDRESS)hpure, (1 + (hNvar * hNvar)) * sizeof(int)); 1082 1082 hDelete(hexist, hNexist); 1083 1083 pLmFree(pWork); … … 1099 1099 } 1100 1100 1101 static Exponent_t scMax( int i, scfmon stc, int Nvar)1102 { 1103 Exponent_t x, y=stc[0][Nvar];1101 static int scMax( int i, scfmon stc, int Nvar) 1102 { 1103 int x, y=stc[0][Nvar]; 1104 1104 for (; i;) 1105 1105 { … … 1111 1111 } 1112 1112 1113 static Exponent_t scMin( int i, scfmon stc, int Nvar)1114 { 1115 Exponent_t x, y=stc[0][Nvar];1113 static int scMin( int i, scfmon stc, int Nvar) 1114 { 1115 int x, y=stc[0][Nvar]; 1116 1116 for (; i;) 1117 1117 { … … 1123 1123 } 1124 1124 1125 static Exponent_t scRestrict( int &Nstc, scfmon stc, int Nvar)1126 { 1127 Exponent_t x, y;1125 static int scRestrict( int &Nstc, scfmon stc, int Nvar) 1126 { 1127 int x, y; 1128 1128 int i, j, Istc = Nstc; 1129 1129 … … 1174 1174 } 1175 1175 1176 static void scAll( int Nvar, Exponent_t deg)1176 static void scAll( int Nvar, int deg) 1177 1177 { 1178 1178 int i; 1179 Exponent_t d = deg;1179 int d = deg; 1180 1180 if (d == 0) 1181 1181 { … … 1198 1198 } 1199 1199 1200 static void scAllKbase( int Nvar, Exponent_t ideg, Exponent_t deg)1200 static void scAllKbase( int Nvar, int ideg, int deg) 1201 1201 { 1202 1202 do … … 1208 1208 } 1209 1209 1210 static void scDegKbase( scfmon stc, int Nstc, int Nvar, Exponent_t deg)1210 static void scDegKbase( scfmon stc, int Nstc, int Nvar, int deg) 1211 1211 { 1212 1212 int Ivar, Istc, i, j; 1213 1213 scfmon sn; 1214 Exponent_t x, ideg;1214 int x, ideg; 1215 1215 1216 1216 if (deg == 0) … … 1288 1288 int Ivar, Istc, i, j; 1289 1289 scfmon sn; 1290 Exponent_t x, ideg;1290 int x, ideg; 1291 1291 1292 1292 if (Nvar == 1) … … 1378 1378 p = last = pInit(); 1379 1379 /*pNext(p) = NULL;*/ 1380 act = (scmon)omAlloc((pVariables + 1) * sizeof( Exponent_t));1380 act = (scmon)omAlloc((pVariables + 1) * sizeof(int)); 1381 1381 *act = 0; 1382 1382 if (!hNexist) … … 1409 1409 ende: 1410 1410 hDelete(hexist, hNexist); 1411 omFreeSize((ADDRESS)act, (pVariables + 1) * sizeof( Exponent_t));1411 omFreeSize((ADDRESS)act, (pVariables + 1) * sizeof(int)); 1412 1412 hKill(stcmem, pVariables - 1); 1413 1413 pDeleteLm(&p); -
Singular/hilb.cc
ra57391 r8d1bbc 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: hilb.cc,v 1.2 0 2001-08-27 14:47:01Singular Exp $ */4 /* $Id: hilb.cc,v 1.21 2003-03-11 16:48:04 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Hilbert series … … 125 125 { 126 126 int iv = Nvar -1, ln, a, a0, a1, b, i; 127 Exponent_t x, x0;127 int x, x0; 128 128 scmon pn; 129 129 scfmon sn; … … 192 192 { 193 193 int i, k; 194 Exponent_t x;194 int x; 195 195 196 196 for (i=pVariables; i; i--) … … 211 211 { 212 212 intvec *work, *hseries1=NULL; 213 Exponent_t mc;213 int mc; 214 214 int *p0; 215 215 int i, j, k, l, ii, mw; … … 232 232 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 233 233 hvar = (varset)omAlloc((pVariables + 1) * sizeof(int)); 234 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof( Exponent_t));234 hpure = (scmon)omAlloc((1 + (pVariables * pVariables)) * sizeof(int)); 235 235 stcmem = hCreate(pVariables - 1); 236 236 Qpol = (int **)omAlloc((pVariables + 1) * sizeof(int *)); … … 272 272 hOrdSupp(hstc, hNstc, hvar, hNvar); 273 273 hHilbEst(hstc, hNstc, hvar, hNvar); 274 memset(hpure, 0, (pVariables + 1) * sizeof( Exponent_t));274 memset(hpure, 0, (pVariables + 1) * sizeof(int)); 275 275 hPure(hstc, 0, &hNstc, hvar, hNvar, hpure, &hNpure); 276 276 hLexS(hstc, hNstc, hvar, hNvar); … … 348 348 omFreeSize((ADDRESS)Qpol, (pVariables + 1) * sizeof(int *)); 349 349 hKill(stcmem, pVariables - 1); 350 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof( Exponent_t));350 omFreeSize((ADDRESS)hpure, (1 + (pVariables * pVariables)) * sizeof(int)); 351 351 omFreeSize((ADDRESS)hvar, (pVariables + 1) * sizeof(int)); 352 352 omFreeSize((ADDRESS)hwork, hNexist * sizeof(scmon)); -
Singular/hutil.cc
ra57391 r8d1bbc 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: hutil.cc,v 1.2 1 2003-02-18 15:35:05Singular Exp $ */4 /* $Id: hutil.cc,v 1.22 2003-03-11 16:48:04 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: Utilities for staircase operations … … 20 20 varset hvar, hsel; 21 21 int hNexist, hNstc, hNrad, hNvar, hNpure; 22 Exponent_t hisModule;22 int hisModule; 23 23 monf stcmem, radmem; 24 24 … … 29 29 // "security" copy as well. But then, all the relevant data is held in 30 30 // global variables, so we might do that here, as well. 31 static Exponent_t **hsecure= NULL;31 static int **hsecure= NULL; 32 32 33 33 scfmon hInit(ideal S, ideal Q, int *Nexist, ring tailRing) … … 85 85 return NULL; 86 86 ek = ex = (scfmon)omAlloc(k * sizeof(scmon)); 87 hsecure = ( Exponent_t**) omAlloc(k * sizeof(scmon));87 hsecure = (int**) omAlloc(k * sizeof(scmon)); 88 88 for (i = sl; i>0; i--) 89 89 { 90 90 if (*si!=NULL) 91 91 { 92 *ek = ( Exponent_t*) omAlloc((pVariables+1)*sizeof(Exponent_t));92 *ek = (int*) omAlloc((pVariables+1)*sizeof(int)); 93 93 pGetExpV(*si, *ek); 94 94 ek++; … … 100 100 if (*qi!=NULL) 101 101 { 102 *ek = ( Exponent_t*) omAlloc((pVariables+1)*sizeof(Exponent_t));102 *ek = (int*) omAlloc((pVariables+1)*sizeof(int)); 103 103 pGetExpV(*qi, *ek); 104 104 ek++; … … 113 113 { 114 114 int i, k; 115 Exponent_t x;115 int x; 116 116 117 117 i = pVariables; … … 140 140 141 141 for (i=0;i<ev_length;i++) 142 omFreeSize(hsecure[i],(pVariables+1)*sizeof( Exponent_t));142 omFreeSize(hsecure[i],(pVariables+1)*sizeof(int)); 143 143 omFreeSize(hsecure, ev_length*sizeof(scmon)); 144 144 omFreeSize(ev, ev_length*sizeof(scmon)); … … 146 146 147 147 148 void hComp(scfmon exist, int Nexist, Exponent_t ak, scfmon stc, int *Nstc)148 void hComp(scfmon exist, int Nexist, int ak, scfmon stc, int *Nstc) 149 149 { 150 150 int i = Nexist, k = 0; … … 195 195 { 196 196 int i, i1, j, jj, k, l; 197 Exponent_t x;197 int x; 198 198 scmon temp, count; 199 199 float o, h, g, *v1; 200 200 201 201 v1 = (float *)omAlloc(Nvar * sizeof(float)); 202 temp = ( Exponent_t *)omAlloc(Nstc * sizeof(Exponent_t));203 count = ( Exponent_t *)omAlloc(Nstc * sizeof(Exponent_t));202 temp = (int *)omAlloc(Nstc * sizeof(int)); 203 count = (int *)omAlloc(Nstc * sizeof(int)); 204 204 for (i = 1; i <= Nvar; i++) 205 205 { … … 258 258 v1[i-1] = h * (float)jj; 259 259 } 260 omFreeSize((ADDRESS)count, Nstc * sizeof( Exponent_t));261 omFreeSize((ADDRESS)temp, Nstc * sizeof( Exponent_t));260 omFreeSize((ADDRESS)count, Nstc * sizeof(int)); 261 omFreeSize((ADDRESS)temp, Nstc * sizeof(int)); 262 262 for (i = 1; i < Nvar; i++) 263 263 { … … 939 939 940 940 941 void hStepS(scfmon stc, int Nstc, varset var, int Nvar, int *a, Exponent_t *x)941 void hStepS(scfmon stc, int Nstc, varset var, int Nvar, int *a, int *x) 942 942 { 943 943 int k1, i; 944 Exponent_t y;944 int y; 945 945 k1 = var[Nvar]; 946 946 y = *x; … … 1034 1034 * p1 = p + 1; 1035 1035 * pn = p1 + pVariables; 1036 * memcpy(pn, p1, pVariables * sizeof( Exponent_t));1036 * memcpy(pn, p1, pVariables * sizeof(int)); 1037 1037 * return pn - 1; 1038 1038 *} … … 1045 1045 pn = p1; 1046 1046 pn += pVariables; 1047 memcpy(pn, p1, pVariables * sizeof( Exponent_t));1047 memcpy(pn, p1, pVariables * sizeof(int)); 1048 1048 return pn - 1; 1049 1049 } -
Singular/hutil.h
ra57391 r8d1bbc 7 7 * ABSTRACT 8 8 */ 9 typedef Exponent_t * scmon;9 typedef int * scmon; 10 10 typedef scmon * scfmon; 11 11 typedef int * varset; … … 26 26 extern varset hvar, hsel; 27 27 extern int hNexist, hNstc, hNrad, hNvar, hNpure; 28 extern Exponent_t hisModule;28 extern int hisModule; 29 29 extern monf stcmem, radmem; 30 30 … … 32 32 void hWeight(); 33 33 void hDelete(scfmon ev, int ev_length); 34 void hComp(scfmon exist, int Nexist, Exponent_t ak, scfmon stc, int * Nstc);34 void hComp(scfmon exist, int Nexist, int ak, scfmon stc, int * Nstc); 35 35 void hSupp(scfmon stc, int Nstc, varset var, int * Nvar); 36 36 void hOrdSupp(scfmon stc, int Nstc, varset var, int Nvar); … … 47 47 void hLex2R(scfmon rad, int e1, int a2, int e2,varset var, 48 48 int Nvar, scfmon w); 49 void hStepS(scfmon stc, int Nstc, varset var, int Nvar,int *a, Exponent_t *x);49 void hStepS(scfmon stc, int Nstc, varset var, int Nvar,int *a, int *x); 50 50 void hStepR(scfmon rad, int Nrad, varset var, int Nvar,int *a); 51 51 monf hCreate(int Nvar); -
Singular/mpr_base.cc
ra57391 r8d1bbc 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: mpr_base.cc,v 1.2 8 2002-01-30 14:33:04Singular Exp $ */4 /* $Id: mpr_base.cc,v 1.29 2003-03-11 16:57:25 Singular Exp $ */ 5 5 6 6 /* … … 188 188 * else returns true 189 189 */ 190 bool addPoint( const Exponent_t * vert );190 bool addPoint( const int * vert ); 191 191 192 192 /** Adds a point to pointSet, copy vert[0,...,dim] ot point[num+1][0,...,dim]. … … 207 207 * Returns true, iff added, else false. 208 208 */ 209 bool mergeWithExp( const Exponent_t * vert );209 bool mergeWithExp( const int * vert ); 210 210 211 211 /* Adds support of poly p to pointSet, iff pointSet \cap point = \emptyset. */ … … 213 213 214 214 /* Returns the row polynom multiplicator in vert[] */ 215 void getRowMP( const int indx, Exponent_t * vert );215 void getRowMP( const int indx, int * vert ); 216 216 217 217 /* Returns index of supp(LT(p)) in pointSet. */ … … 475 475 } 476 476 477 bool pointSet::addPoint( const Exponent_t * vert )477 bool pointSet::addPoint( const int * vert ) 478 478 { 479 479 int i; … … 531 531 } 532 532 533 bool pointSet::mergeWithExp( const Exponent_t * vert )533 bool pointSet::mergeWithExp( const int * vert ) 534 534 { 535 535 int i,j; … … 554 554 int i,j; 555 555 poly piter= p; 556 Exponent_t * vert;557 vert= ( Exponent_t *)omAlloc( (dim+1) * sizeof(Exponent_t) );556 int * vert; 557 vert= (int *)omAlloc( (dim+1) * sizeof(int) ); 558 558 559 559 while ( piter ) … … 575 575 pIter( piter ); 576 576 } 577 omFreeSize( (ADDRESS) vert, (dim+1) * sizeof( Exponent_t) );577 omFreeSize( (ADDRESS) vert, (dim+1) * sizeof(int) ); 578 578 } 579 579 580 580 int pointSet::getExpPos( const poly p ) 581 581 { 582 Exponent_t * vert;582 int * vert; 583 583 int i,j; 584 584 585 585 // hier unschoen... 586 vert= ( Exponent_t *)omAlloc( (dim+1) * sizeof(Exponent_t) );586 vert= (int *)omAlloc( (dim+1) * sizeof(int) ); 587 587 588 588 pGetExpV( p, vert ); … … 593 593 if ( j > dim ) break; 594 594 } 595 omFreeSize( (ADDRESS) vert, (dim+1) * sizeof( Exponent_t) );595 omFreeSize( (ADDRESS) vert, (dim+1) * sizeof(int) ); 596 596 597 597 if ( i > num ) return 0; … … 599 599 } 600 600 601 void pointSet::getRowMP( const int indx, Exponent_t * vert )601 void pointSet::getRowMP( const int indx, int * vert ) 602 602 { 603 603 assume( indx > 0 && indx <= num && points[indx]->rcPnt ); … … 606 606 vert[0]= 0; 607 607 for ( i= 1; i <= dim; i++ ) 608 vert[i]= ( Exponent_t)(points[indx]->point[i] - points[indx]->rcPnt->point[i]);608 vert[i]= (int)(points[indx]->point[i] - points[indx]->rcPnt->point[i]); 609 609 } 610 610 … … 781 781 int m; // Anzahl der Exponentvektoren im i-ten Polynom (gls->m)[i] des Ideals gls 782 782 int idelem= IDELEMS(gls); 783 Exponent_t * vert;783 int * vert; 784 784 785 785 n= pVariables; 786 vert= ( Exponent_t *)omAlloc( (idelem+1) * sizeof(Exponent_t) );786 vert= (int *)omAlloc( (idelem+1) * sizeof(int) ); 787 787 788 788 Q = (pointSet **)omAlloc( idelem * sizeof(pointSet*) ); // support hulls … … 813 813 } // i 814 814 815 omFreeSize( (ADDRESS) vert, (idelem+1) * sizeof( Exponent_t) );815 omFreeSize( (ADDRESS) vert, (idelem+1) * sizeof(int) ); 816 816 817 817 #ifdef mprDEBUG_PROT … … 841 841 ideal id; 842 842 poly p,pid,pd; 843 Exponent_t * vert;843 int * vert; 844 844 845 845 n= pVariables; 846 vert= ( Exponent_t *)omAlloc( (idelem+1) * sizeof(Exponent_t) );846 vert= (int *)omAlloc( (idelem+1) * sizeof(int) ); 847 847 id= idInit( idelem, 1 ); 848 848 … … 877 877 } // i 878 878 879 omFreeSize( (ADDRESS) vert, (idelem+1) * sizeof( Exponent_t) );879 omFreeSize( (ADDRESS) vert, (idelem+1) * sizeof(int) ); 880 880 881 881 #ifdef mprDEBUG_PROT … … 1420 1420 poly rowp,epp; 1421 1421 poly iterp; 1422 Exponent_t *epp_mon, *eexp;1423 1424 epp_mon= ( Exponent_t *)omAlloc( (n+2) * sizeof(Exponent_t) );1425 eexp= ( Exponent_t *)omAlloc0((pVariables+1)*sizeof(Exponent_t));1422 int *epp_mon, *eexp; 1423 1424 epp_mon= (int *)omAlloc( (n+2) * sizeof(int) ); 1425 eexp= (int *)omAlloc0((pVariables+1)*sizeof(int)); 1426 1426 1427 1427 totDeg= numSet0; … … 1481 1481 1482 1482 pDelete( &epp ); 1483 omFreeSize( (ADDRESS) epp_mon, (n+2) * sizeof( Exponent_t) );1484 omFreeSize( (ADDRESS) eexp, (pVariables+1)*sizeof( Exponent_t));1483 omFreeSize( (ADDRESS) epp_mon, (n+2) * sizeof(int) ); 1484 omFreeSize( (ADDRESS) eexp, (pVariables+1)*sizeof(int)); 1485 1485 1486 1486 #ifdef mprDEBUG_ALL -
Singular/mpr_numeric.cc
ra57391 r8d1bbc 3 3 ****************************************/ 4 4 5 /* $Id: mpr_numeric.cc,v 1.1 7 2001-11-12 10:58:55 pohlExp $ */5 /* $Id: mpr_numeric.cc,v 1.18 2003-03-11 16:58:40 Singular Exp $ */ 6 6 7 7 /* … … 110 110 sum=0; 111 111 112 Exponent_t *exp= (Exponent_t *) omAlloc( (n+1) * sizeof(Exponent_t) );112 int *exp= (int *) omAlloc( (n+1) * sizeof(int) ); 113 113 114 114 for ( j= 0; j < n+1; j++ ) exp[j]=0; … … 147 147 } 148 148 149 omFreeSize( (ADDRESS) exp, (n+1) * sizeof( Exponent_t) );149 omFreeSize( (ADDRESS) exp, (n+1) * sizeof(int) ); 150 150 151 151 pSortAdd(pit); -
Singular/pInline1.h
ra57391 r8d1bbc 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: pInline1.h,v 1.2 0 2001-08-27 14:47:20Singular Exp $9 * Version: $Id: pInline1.h,v 1.21 2003-03-11 16:43:15 Singular Exp $ 10 10 *******************************************************************/ 11 11 #ifndef PINLINE1_H … … 280 280 } 281 281 282 PINLINE1 void p_GetExpV(poly p, Exponent_t *ev, ring r)282 PINLINE1 void p_GetExpV(poly p, int *ev, ring r) 283 283 { 284 284 p_LmCheckPolyRing1(p, r); … … 288 288 ev[0] = _p_GetComp(p, r); 289 289 } 290 PINLINE1 void p_SetExpV(poly p, Exponent_t *ev, ring r)290 PINLINE1 void p_SetExpV(poly p, int *ev, ring r) 291 291 { 292 292 p_LmCheckPolyRing1(p, r); -
Singular/p_polys.h
ra57391 r8d1bbc 8 8 * Author: obachman (Olaf Bachmann) 9 9 * Created: 9/00 10 * Version: $Id: p_polys.h,v 1.2 3 2003-03-11 16:26:32Singular Exp $10 * Version: $Id: p_polys.h,v 1.24 2003-03-11 16:42:40 Singular Exp $ 11 11 *******************************************************************/ 12 12 #ifndef P_POLYS_H … … 138 138 PINLINE1 unsigned long p_ExpVectorQuerSum(poly p, ring r); 139 139 140 PINLINE1 void p_GetExpV(poly p, Exponent_t *ev, ring r);141 PINLINE1 void p_SetExpV(poly p, Exponent_t *ev, ring r);140 PINLINE1 void p_GetExpV(poly p, int *ev, ring r); 141 PINLINE1 void p_SetExpV(poly p, int *ev, ring r); 142 142 143 143 -
Singular/polys.cc
ra57391 r8d1bbc 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys.cc,v 1. 79 2003-01-30 14:59:59Singular Exp $ */4 /* $Id: polys.cc,v 1.80 2003-03-11 16:52:40 Singular Exp $ */ 5 5 6 6 /* … … 838 838 int exponent,i; 839 839 poly h, res, m; 840 Exponent_t *me,*ee;840 int *me,*ee; 841 841 number nu,nu1; 842 842 843 me=( Exponent_t *)omAlloc((pVariables+1)*sizeof(Exponent_t));844 ee=( Exponent_t *)omAlloc((pVariables+1)*sizeof(Exponent_t));843 me=(int *)omAlloc((pVariables+1)*sizeof(int)); 844 ee=(int *)omAlloc((pVariables+1)*sizeof(int)); 845 845 if (e!=NULL) pGetExpV(e,ee); 846 846 res=NULL; … … 868 868 pDeleteLm(&h); 869 869 } 870 omFreeSize((ADDRESS)me,(pVariables+1)*sizeof( Exponent_t));871 omFreeSize((ADDRESS)ee,(pVariables+1)*sizeof( Exponent_t));870 omFreeSize((ADDRESS)me,(pVariables+1)*sizeof(int)); 871 omFreeSize((ADDRESS)ee,(pVariables+1)*sizeof(int)); 872 872 return res; 873 873 } -
Singular/weight.cc
ra57391 r8d1bbc 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: weight.cc,v 1.2 2 2001-11-27 12:33:03Singular Exp $ */4 /* $Id: weight.cc,v 1.23 2003-03-11 16:54:06 Singular Exp $ */ 5 5 6 6 /* … … 75 75 int n, a, i, j, *B, *C; 76 76 poly p, q; 77 Exponent_t *pl;77 int *pl; 78 78 79 79 B = A; 80 80 n = pVariables; 81 a = (n + 1) * sizeof( Exponent_t);82 pl = ( Exponent_t *)omAlloc(a);81 a = (n + 1) * sizeof(int); 82 pl = (int *)omAlloc(a); 83 83 for (i = 0; i <= sl; i++) 84 84 {
Note: See TracChangeset
for help on using the changeset viewer.