Skip to content

Commit

Permalink
Quotient ideal may be NULL :(
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Motsak committed May 27, 2015
1 parent 5f24eca commit 794d7ba
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
28 changes: 18 additions & 10 deletions kernel/combinatorics/hdegree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ void hDimSolve(scmon pure, int Npure, scfmon rad, int Nrad,
int scDimInt(ideal S, ideal Q)
{
id_Test(S, currRing);
id_Test(Q, currRing);
if( Q!=NULL ) id_Test(Q, currRing);

int mc;
hexist = hInit(S, Q, &hNexist, currRing);
if (!hNexist)
Expand Down Expand Up @@ -211,7 +212,8 @@ static void hIndSolve(scmon pure, int Npure, scfmon rad, int Nrad,
intvec * scIndIntvec(ideal S, ideal Q)
{
id_Test(S, currRing);
id_Test(Q, currRing);
if( Q!=NULL ) id_Test(Q, currRing);

intvec *Set=new intvec((currRing->N));
int mc,i;
hexist = hInit(S, Q, &hNexist, currRing);
Expand Down Expand Up @@ -696,7 +698,8 @@ static void hDimMult(scmon pure, int Npure, scfmon rad, int Nrad,
static void hDegree(ideal S, ideal Q)
{
id_Test(S, currRing);
id_Test(Q, currRing);
if( Q!=NULL ) id_Test(Q, currRing);

int di;
int mc;
hexist = hInit(S, Q, &hNexist, currRing);
Expand Down Expand Up @@ -796,7 +799,8 @@ static void hDegree(ideal S, ideal Q)
int scMultInt(ideal S, ideal Q)
{
id_Test(S, currRing);
id_Test(Q, currRing);
if( Q!=NULL ) id_Test(Q, currRing);

hDegree(S, Q);
return hMu;
}
Expand All @@ -818,7 +822,8 @@ void scPrintDegree(int co, int mu)
void scDegree(ideal S, intvec *modulweight, ideal Q)
{
id_Test(S, currRing);
id_Test(Q, currRing);
if( Q!=NULL ) id_Test(Q, currRing);

int co, mu, l;
intvec *hseries2;
intvec *hseries1 = hFirstSeries(S, modulweight, Q);
Expand All @@ -840,7 +845,7 @@ void scDegree(ideal S, intvec *modulweight, ideal Q)
static void hDegree0(ideal S, ideal Q, const ring tailRing)
{
id_TestTail(S, currRing, tailRing);
id_TestTail(Q, currRing, tailRing);
if (Q!=NULL) id_TestTail(Q, currRing, tailRing);

int mc;
hexist = hInit(S, Q, &hNexist, tailRing);
Expand Down Expand Up @@ -914,7 +919,8 @@ static void hDegree0(ideal S, ideal Q, const ring tailRing)
int scMult0Int(ideal S, ideal Q, const ring tailRing)
{
id_TestTail(S, currRing, tailRing);
id_TestTail(Q, currRing, tailRing);
if (Q!=NULL) id_TestTail(Q, currRing, tailRing);

hDegree0(S, Q, tailRing);
return hMu;
}
Expand Down Expand Up @@ -999,7 +1005,8 @@ static void hHedgeStep(scmon pure, scfmon stc,
void scComputeHC(ideal S, ideal Q, int ak, poly &hEdge, ring tailRing)
{
id_TestTail(S, currRing, tailRing);
id_TestTail(Q, currRing, tailRing);
if (Q!=NULL) id_TestTail(Q, currRing, tailRing);

int i;
int k = ak;

Expand Down Expand Up @@ -1332,7 +1339,8 @@ static ideal scIdKbase(poly q, const int rank)

ideal scKBase(int deg, ideal s, ideal Q, intvec * mv)
{
id_Test(Q, currRing);
if( Q!=NULL) id_Test(Q, currRing);

int i, di;
poly p;

Expand Down Expand Up @@ -1400,7 +1408,7 @@ ideal scKBase(int deg, ideal s, ideal Q, intvec * mv)
void scComputeHCw(ideal ss, ideal Q, int ak, poly &hEdge, ring tailRing)
{
id_TestTail(ss, currRing, tailRing);
id_TestTail(Q, currRing, tailRing);
if (Q!=NULL) id_TestTail(Q, currRing, tailRing);

int i, di;
poly p;
Expand Down
5 changes: 3 additions & 2 deletions kernel/combinatorics/hilb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1298,8 +1298,9 @@ intvec * hHstdSeries(ideal S, intvec *modulweight, intvec *wdegree, ideal Q, rin

intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
{
id_TestTail(S, currRing, tailRing);
id_TestTail(Q, currRing, tailRing);
id_TestTail(S, currRing, tailRing);
if (Q!= NULL) id_TestTail(Q, currRing, tailRing);

return hSeries(S, modulweight, 1, wdegree, Q, tailRing);
}

Expand Down

0 comments on commit 794d7ba

Please sign in to comment.