Changeset 75f83c in git
- Timestamp:
- Sep 21, 2023, 4:28:05 PM (8 months ago)
- Branches:
- (u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
- Children:
- 70a5104457d3ea96b77d515e712f8a3fbb0b7144
- Parents:
- 5bb58e4c13fe299469984183890384cb6dd543b0
- git-author:
- slap <slaplagne@gmail.com>2023-09-21 16:28:05+02:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2023-11-07 16:30:30+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/integralbasis.lib
r5bb58e r75f83c 1186 1186 } 1187 1187 1188 // We compute the Puiseux segments using Hensel lifting. 1189 // The segments are order according to the initial exponent from 1190 // smaller to larger. 1191 // The classes of Puiseux expansions are grouped matching the 1192 // Puiseux segments. 1193 1188 1194 proc getSegments(poly f, list classes, list slopes, int globOrder) 1189 1195 { … … 1208 1214 int locOrder = maxOrder; 1209 1215 1216 // If loc == 1, we remove the component outside the origin. 1210 1217 if(loc == 1) 1211 1218 { … … 1229 1236 for(i = 1; i <= size(fSegment); i++) 1230 1237 { 1238 // We compute the newton poly of each polynomial to find out the 1239 // corresponding slope 1231 1240 list l = newtonpoly(fSegment[i]); 1232 "l(", i , ") = ", l;1233 1234 1241 slopeSegment = number(l[2][1]) / number(l[1][2]); 1242 1243 // We look for all classes with same slope as each segment 1235 1244 classesNew = list(); 1236 1237 // We look for all classes with same slope as this segment1238 1245 for(j = 1; j <= size(classes); j++) 1239 1246 { … … 1244 1251 } 1245 1252 } 1253 1254 // We put everything together 1246 1255 out[i] = list(fSegment[i], slopeSegment, classesNew); 1247 1256 } … … 1251 1260 out = sortSegments(out); 1252 1261 1253 1254 "output of getSegments: "; out;1255 //~;1256 1262 return(out); 1257 1263 } … … 1261 1267 proc sortSegments(list segment); 1262 1268 { 1263 //"START - integralbasis.lib - sort Factors - 1";1269 //"START - integralbasis.lib - sortSegments - 1"; 1264 1270 int i, j; 1265 1271 int n = size(segment); … … 1281 1287 1282 1288 1283 // We compute the local integral at f by exhaustive search1284 // See "Direct approach in the combinatorial paper 1289 // We compute the local integral basis at f by exhaustive search 1290 // See "Direct approach in the combinatorial paper. 1285 1291 proc ibSegment(poly f, list classes, int degExpand) 1286 1292 { … … 1291 1297 intvec degPolySet; 1292 1298 intvec vy = (0,1); 1293 // We get all the possible polynomials, includign the full polys 1299 1300 // We get all the possible polynomials, including the full polys 1294 1301 list bF = buildFactors(classes); 1295 1302 … … 1300 1307 for(i = 1; i <= size(classes); i++) 1301 1308 { 1309 // We put everything in a list, with no repeated elements 1302 1310 for(j = 1; j <= size(bF[1][i]); j++) 1303 1311 { … … 1307 1315 } 1308 1316 } 1317 // We compute the full polynomial up to the integrality exponent 1309 1318 pGround = buildPolyGroundXRootClass(classes[i], degExpand); 1310 1319 if(in_array(polySet, pGround) == 0) … … 1330 1339 } 1331 1340 } 1332 "polySet = "; polySet;1333 "degPolySet = "; degPolySet;1334 "ordExpAtPoly = "; ordExpAtPoly;1335 ~;1341 //"polySet = "; polySet; 1342 //"degPolySet = "; degPolySet; 1343 //"ordExpAtPoly = "; ordExpAtPoly; 1344 //~; 1336 1345 1337 1346 // We compute the integral basis by exhaustive search … … 1341 1350 } 1342 1351 1352 // For each degree up to the degree of f, with compute the best 1353 // possible product of factors by checking exhaustively all possible 1354 // combinations such that the product has the correct degree. 1343 1355 proc ibExhaustive(list polySet, intvec degPolySet, list ordExpAtPoly, int degF) 1344 1356 { … … 1355 1367 // The best element of degree d; 1356 1368 oMax = 0; 1369 1370 // We generate the list of all possible combinations 1357 1371 c = summandsFac(degPolySet, d); 1372 1373 // We compute the valuation of each combination, 1374 // and we keep the largest one. 1358 1375 for(i = 1; i <= size(c); i++) 1359 1376 { … … 1375 1392 "---"; 1376 1393 } 1377 "ib computation finished!";1378 ib;1394 //"ib computation finished!"; 1395 //ib; 1379 1396 return(ib); 1380 1397 } … … 1406 1423 } 1407 1424 1408 1425 // List of intvecs suchs that the sum of each coordinate times the degree 1426 // given in degPolySet equals degTotal 1427 // This is used to compute a product of factors such that the total 1428 // degree is equal to degTotal 1409 1429 proc summandsFac(intvec degPolySet, int degTotal) 1410 1430 { … … 1435 1455 } 1436 1456 1437 1457 //We implement the optimization approach from scratch 1438 1458 proc optiBase(list ibSeg, list segmentSlope) 1439 1459 { … … 1552 1572 dbprint(dbg, "---- Degree of expansions: ", degExpand); 1553 1573 1574 1575 // Optimization algorithm from scratch 1554 1576 if(optimize == 1) 1555 1577 { … … 1575 1597 IOut[1] = var(1)^intExp; 1576 1598 1577 // We conver yto ib shape1599 // We convert to ib shape 1578 1600 for(i = 1; i <= size(ib); i++) 1579 1601 {
Note: See TracChangeset
for help on using the changeset viewer.