MCPcopy Create free account
hub / github.com/Singular/Singular / kTryHC

Function kTryHC

kernel/GBEngine/kstd1.cc:2437–2469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2435}
2436
2437static poly kTryHC(ideal F, ideal Q)
2438{
2439 if (TEST_OPT_PROT) PrintS("try HC in Zp ring\n");
2440 // create Zp_ring
2441 ring save_ring=currRing;
2442 ring Zp_ring=rCopy0(save_ring);
2443 nKillChar(Zp_ring->cf);
2444 Zp_ring->cf=nInitChar(n_Zp, (void*)(long)32003);
2445 rComplete(Zp_ring);
2446 // map data
2447 rChangeCurrRing(Zp_ring);
2448 nMapFunc nMap=n_SetMap(save_ring->cf,Zp_ring->cf);
2449 ideal FF=id_PermIdeal(F,IDELEMS(F),1,NULL,save_ring,Zp_ring,nMap,NULL,0,0);
2450 ideal QQ=NULL;
2451 if (Q!=NULL) QQ=id_PermIdeal(Q,IDELEMS(Q),1,NULL,save_ring,Zp_ring,nMap,NULL,0,0);
2452 // call std
2453 ideal res=kStd(FF,QQ,testHomog,NULL,NULL);
2454 // clean
2455 idDelete(&FF);
2456 if (QQ!=NULL) idDelete(&QQ);
2457 idDelete(&res);
2458 // map back
2459 rChangeCurrRing(save_ring);
2460 poly p=NULL;
2461 if (Zp_ring->ppNoether!=NULL)
2462 {
2463 p=p_PermPoly(Zp_ring->ppNoether,NULL,Zp_ring,save_ring,nMap,NULL,0,0);
2464 Zp_ring->ppNoether=NULL;
2465 if (TEST_OPT_PROT) PrintS("HC found in Zp ring\n");
2466 }
2467 rDelete(Zp_ring);
2468 return p;
2469}
2470
2471ideal kStd(ideal F, ideal Q, tHomog h,intvec ** w, intvec *hilb,int syzComp,
2472 int newIdeal, intvec *vw, s_poly_proc_t sp)

Callers 1

kStdFunction · 0.85

Calls 11

PrintSFunction · 0.85
rCopy0Function · 0.85
nKillCharFunction · 0.85
nInitCharFunction · 0.85
rCompleteFunction · 0.85
rChangeCurrRingFunction · 0.85
n_SetMapFunction · 0.85
id_PermIdealFunction · 0.85
kStdFunction · 0.85
p_PermPolyFunction · 0.85
rDeleteFunction · 0.85

Tested by

no test coverage detected