Changeset 5020a6 in git
- Timestamp:
- Mar 5, 2012, 8:43:59 PM (12 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
- Children:
- 74afe1f3ea99838d00c52d1a3eaef93fc067ba10
- Parents:
- 8b78ee10b628bc9fde6d3e7d8eb3c4e311dc9600
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-05 20:43:59+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-05-07 04:41:43+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dyn_modules/syzextra/mod_main.cc
r8b78ee r5020a6 55 55 extern int rGetISPos(const int p, const ring r); 56 56 57 58 57 USING_NAMESPACE( SINGULARXXNAME :: DEBUG ) 59 58 USING_NAMESPACE( SINGULARXXNAME :: NF ) 60 59 60 61 61 BEGIN_NAMESPACE_NONAME 62 63 62 64 static inline void NoReturn(leftv& res) 63 65 { … … 1075 1077 } 1076 1078 1079 1080 /* // the following turned out to be unnecessary... 1081 /// Finds p^th AM ordering, and returns its position in r->typ[] AND 1082 /// corresponding &r->wvhdl[] 1083 /// returns FALSE if something went wrong! 1084 /// p - starts with 0! 1085 BOOLEAN rGetAMPos(const ring r, const int p, int &typ_pos, int &wvhdl_pos, const BOOLEAN bSearchWvhdl = FALSE) 1086 { 1087 #if MYTEST 1088 Print("rGetAMPos(p: %d...)\nF:", p); 1089 PrintLn(); 1090 #endif 1091 typ_pos = -1; 1092 wvhdl_pos = -1; 1093 1094 if (r->typ==NULL) 1095 return FALSE; 1096 1097 1098 int j = p; // Which IS record to use... 1099 for( int pos = 0; pos < r->OrdSize; pos++ ) 1100 if( r->typ[pos].ord_typ == ro_am) 1101 if( j-- == 0 ) 1102 { 1103 typ_pos = pos; 1104 1105 if( bSearchWvhdl ) 1106 { 1107 const int nblocks = rBlocks(r) - 1; 1108 const int* w = r->typ[pos].data.am.weights; // ? 1109 1110 for( pos = 0; pos <= nblocks; pos ++ ) 1111 if (r->order[pos] == ringorder_am) 1112 if( r->wvhdl[pos] == w ) 1113 { 1114 wvhdl_pos = pos; 1115 break; 1116 } 1117 if (wvhdl_pos < 0) 1118 return FALSE; 1119 1120 assume(wvhdl_pos >= 0); 1121 } 1122 assume(typ_pos >= 0); 1123 return TRUE; 1124 } 1125 1126 return FALSE; 1127 } 1128 1129 // // ? 1130 // static BOOLEAN GetAMData(leftv res, leftv h) 1131 // { 1132 // NoReturn(res); 1133 // 1134 // const ring r = currRing; 1135 // 1136 // int p = 0; // which IS-block? p^th! 1137 // 1138 // if ((h!=NULL) && (h->Typ()==INT_CMD)) 1139 // p = (int)((long)(h->Data())); h=h->next; 1140 // 1141 // assume(p >= 0); 1142 // 1143 // int d, w; 1144 // 1145 // if( !rGetAMPos(r, p, d, w, TRUE) ) 1146 // { 1147 // Werror("`GetAMData([int])`: no %d^th _am block-ordering!", p); 1148 // return TRUE; 1149 // } 1150 // 1151 // assume( r->typ[d].ord_typ == ro_am ); 1152 // assume( r->order[w] == ringorder_am ); 1153 // 1154 // 1155 // const short start = r->typ[d].data.am.start; // bounds of ordering (in E) 1156 // const short end = r->typ[d].data.am.end; 1157 // const short len_gen = r->typ[d].data.am.len_gen; // i>len_gen: weight(gen(i)):=0 1158 // const int *weights = r->typ[d].data.am.weights; // pointers into wvhdl field of length (end-start+1) + len_gen 1159 // // contents w_1,... w_n, len, mod_w_1, .. mod_w_len, 0 1160 // 1161 // assume( weights == r->wvhdl[w] ); 1162 // 1163 // 1164 // lists l=(lists)omAllocBin(slists_bin); 1165 // l->Init(2); 1166 // 1167 // const short V = end-start+1; 1168 // intvec* ww_vars = new intvec(V); 1169 // intvec* ww_gens = new intvec(len_gen); 1170 // 1171 // for (int i = 0; i < V; i++ ) 1172 // (*ww_vars)[i] = weights[i]; 1173 // 1174 // assume( weights[V] == len_gen ); 1175 // 1176 // for (int i = 0; i < len_gen; i++ ) 1177 // (*ww_gens)[i] = weights[i - V - 1]; 1178 // 1179 // 1180 // l->m[0].rtyp = INTVEC_CMD; 1181 // l->m[0].data = reinterpret_cast<void *>(ww_vars); 1182 // 1183 // l->m[1].rtyp = INTVEC_CMD; 1184 // l->m[1].data = reinterpret_cast<void *>(ww_gens); 1185 // 1186 // 1187 // return FALSE; 1188 // 1189 // } 1190 */ 1077 1191 1078 1192 /// Returns old SyzCompLimit, can set new limit … … 1347 1461 ADD(psModulFunctions, currPack->libname, "ClearDenominators", FALSE, _ClearDenominators); 1348 1462 1463 ADD(psModulFunctions, currPack->libname, "m2_end", FALSE, _m2_end); 1464 1349 1465 ADD(psModulFunctions, currPack->libname, "DetailedPrint", FALSE, DetailedPrint); 1350 1466 ADD(psModulFunctions, currPack->libname, "leadmonomial", FALSE, leadmonom); … … 1371 1487 ADD(psModulFunctions, currPack->libname, "Sort_c_ds", FALSE, Sort_c_ds); 1372 1488 1489 // ADD(psModulFunctions, currPack->libname, "GetAMData", FALSE, GetAMData); 1490 1373 1491 // ADD(psModulFunctions, currPack->libname, "", FALSE, ); 1374 1375 ADD(psModulFunctions, currPack->libname, "m2_end", FALSE, _m2_end);1376 1492 1377 1493 #undef ADD
Note: See TracChangeset
for help on using the changeset viewer.