Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
slap committed Sep 11, 2024
1 parent 529da1b commit b462ca4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,4 @@ helpfiles
Singular/LIB/.singularhistory
Singular/LIB/MapleInterface.lib
Singular/LIB/ibDebTools.lib
Singular/LIB/arnoldgit.lib
49 changes: 17 additions & 32 deletions Singular/LIB/intbas_optimization.lib
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,6 @@ proc optiBest(matrix M, list MSelf, intvec md, int k)
// I2LiftedFull are the factors corresponding to the classes in the block, numbered starting from 1
proc optimAlgorithmBlocks(int n, int locBasis, int d0, int d1, list classes, poly unitLiftedFull, list I2LiftedFull, int optimize, list bF, list blocks)
{

// "CLASSES";
// classes;
// ~;

// We create the list of polynomials and their degrees
int i, j, k;
int new;
Expand All @@ -381,6 +376,9 @@ proc optimAlgorithmBlocks(int n, int locBasis, int d0, int d1, list classes, pol

list bElem;

"Original factors: ", I2LiftedFull;


// We construct all the polynomials that can be used as factors of the integral elements

// The full lifted factors
Expand All @@ -400,7 +398,7 @@ proc optimAlgorithmBlocks(int n, int locBasis, int d0, int d1, list classes, pol
{
new = 1;
maxPow = deg(I2LiftedFull[i], vy) div polys_deg[ind]; // The number of factors that can appear in the factorization contributed by the corresponding class.
// Probably we can use this number - 1
// Probably we can use this number - 1
for(k = 1; k <= size(polys); k++)
{
if((reduce(polys[k], bF[1][i][j]) == 0) && (reduce(bF[1][i][j], polys[k]) == 0))
Expand All @@ -420,22 +418,10 @@ proc optimAlgorithmBlocks(int n, int locBasis, int d0, int d1, list classes, pol
}
}


int s = size(classes);
int sC = size(polys);
number order(1..s);

// "classes";
// classes;
//
// "polys";
// polys;
//
// "polys_deg";
// polys_deg;
//
// "polys_maxPow";
// polys_maxPow;

number order(1..s);

list bElems;
intvec elem;
Expand All @@ -449,11 +435,20 @@ proc optimAlgorithmBlocks(int n, int locBasis, int d0, int d1, list classes, pol
for(k = 1; k <= sC; k++) // Polynomials
{
ordPolAtClass[k,j] = number(Integralbasis::ordAtPol(polys[k], classes[j][1]));
//"jsdkf";
//ordPolAtClass[k,j] = tt;
}
}

"polys";
polys;

"classes";
classes;


"ordPolAtClass";
ordPolAtClass;


int dd;
for(dd = 1; dd < d0; dd++)
{
Expand All @@ -474,10 +469,6 @@ proc optimAlgorithmBlocks(int n, int locBasis, int d0, int d1, list classes, pol
{
if(sums[i][k] > 0)
{
// "i, j, k", i, j, k;
// sums[i];
// polys[k];
// classes[j];
if(polys_class[k] == j)
{
order(j) = -1; // When the full lifted factor is used, the valuation at an expansion of the same class is infinity.
Expand Down Expand Up @@ -556,12 +547,6 @@ proc optimAlgorithmBlocks(int n, int locBasis, int d0, int d1, list classes, pol
}
}

// "basis";
// ibNum;
// ibDen;
// //bElem;
// ~;

ideal IOut;
if(locBasis == 1)
{
Expand Down
24 changes: 7 additions & 17 deletions Singular/LIB/integralbasis.lib
Original file line number Diff line number Diff line change
Expand Up @@ -1627,19 +1627,6 @@ static proc ibAt0(poly f, int locBasis, int optimize, int intExp)
// Optimization using factors over the ground field
list IOutComplete = optimAlgorithmBlocks(n, locBasis, d0, d1, classes, unitLifted, factorsAtOriginLifted, optimize, bF, blocks);
IOut = IOutComplete[1];

// "IOut: "; IOut;
// ~;

// "Orders: "; IOutComplete[2];
// "Polys: "; IOut;
//
// "Compare with local";
// locBasis = 1;
// list IOutCompleteLoc = optimAlgorithmBlocks(n, locBasis, d0, d1, vxy, M, MSelf, md, classes, unitLifted, factorsAtOriginLifted, ordsFull, bestElem, optimize, bF, blocks);
//// IOutCompleteLoc;
//// ~;
// locBasis = 0;
}
}
return(IOut);
Expand Down Expand Up @@ -2158,6 +2145,7 @@ proc buildFactors(list classes)
}
}
}
"call 1";
polyGround = buildPolyGround(fFrac, den);
fGround = squarefree(polyGround[1]);
if (polyGround[2] == 0)
Expand Down Expand Up @@ -2344,6 +2332,8 @@ proc buildPolyFrac(poly f)
// The common denominator is now cancelled with the numerators.
static proc buildPolyGround(list fFrac, int sD)
{
"fFrac = "; fFrac;
"sD = ", sD;
int i;
int gfCheck = 1; // The polynomial computed is over the ground field.
// This means the conjugacy is computed correctly.
Expand Down Expand Up @@ -3371,13 +3361,13 @@ static proc irreducibleFactors(poly f, list classes, list blocks, int degExpand)
fuProd = fuProd * fu;
} else
{


fuProd = fuProd * (var(2) - classes2[j][cl][1]);

PEPE = classes2[j][cl][2];
}
}


"call 2";
~;
bPG = buildPolyGround(fuProd, PEPE);
if(bPG[2] == 0)
{
Expand Down

0 comments on commit b462ca4

Please sign in to comment.