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

Function idExtractG_T_S

kernel/ideals.cc:709–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709ideal idExtractG_T_S(ideal s_h3,matrix *T,ideal *S,long syzComp,
710 int h1_size,BOOLEAN inputIsIdeal,const ring oring, const ring sring)
711{
712 // now sort the result, SB : leave in s_h3
713 // T: put in s_h2 (*T as a matrix)
714 // syz: put in *S
715 idSkipZeroes(s_h3);
716 ideal s_h2 = idInit(IDELEMS(s_h3), s_h3->rank); // will become T
717
718 #if 0
719 matrix TT=id_Module2Matrix(idCopy(s_h3),currRing);
720 Print("after std: --------------syzComp=%d------------------------\n",syzComp);
721 ipPrint_MA0(TT,"T");
722 PrintLn();
723 idDelete((ideal*)&TT);
724 #endif
725
726 int j, i=0;
727 for (j=0; j<IDELEMS(s_h3); j++)
728 {
729 if (s_h3->m[j] != NULL)
730 {
731 if (pGetComp(s_h3->m[j]) <= syzComp) // syz_ring == currRing
732 {
733 i++;
734 poly q = s_h3->m[j];
735 while (pNext(q) != NULL)
736 {
737 if (pGetComp(pNext(q)) > syzComp)
738 {
739 s_h2->m[i-1] = pNext(q);
740 pNext(q) = NULL;
741 }
742 else
743 {
744 pIter(q);
745 }
746 }
747 if (!inputIsIdeal) p_Shift(&(s_h3->m[j]), -1,currRing);
748 }
749 else
750 {
751 // we a syzygy here:
752 if (S!=NULL)
753 {
754 p_Shift(&s_h3->m[j], -syzComp,currRing);
755 (*S)->m[j]=s_h3->m[j];
756 s_h3->m[j]=NULL;
757 }
758 else
759 p_Delete(&(s_h3->m[j]),currRing);
760 }
761 }
762 }
763 idSkipZeroes(s_h3);
764
765 #if 0
766 TT=id_Module2Matrix(idCopy(s_h2),currRing);

Callers 2

idLiftStdFunction · 0.85
idModuloFunction · 0.85

Calls 15

idSkipZeroesFunction · 0.85
idInitFunction · 0.85
id_Module2MatrixFunction · 0.85
idCopyFunction · 0.85
ipPrint_MA0Function · 0.85
p_ShiftFunction · 0.85
p_DeleteFunction · 0.85
PrintSFunction · 0.85
rChangeCurrRingFunction · 0.85
mpNewFunction · 0.85
prMoveRFunction · 0.85
pReverseFunction · 0.85

Tested by

no test coverage detected