2 * -puts p to the standardbasis s at position at * -saves the result in S */
| 8912 | * -saves the result in S |
| 8913 | */ |
| 8914 | void enterSSba (LObject &p,int atS,kStrategy strat, int atR) |
| 8915 | { |
| 8916 | strat->news = TRUE; |
| 8917 | /*- puts p to the standardbasis s at position at -*/ |
| 8918 | if (strat->sl == IDELEMS(strat->Shdl)-1) |
| 8919 | { |
| 8920 | strat->sevS = (unsigned long*) omRealloc0Size(strat->sevS, |
| 8921 | IDELEMS(strat->Shdl)*sizeof(unsigned long), |
| 8922 | (IDELEMS(strat->Shdl)+setmax) |
| 8923 | *sizeof(unsigned long)); |
| 8924 | strat->sevSig = (unsigned long*) omRealloc0Size(strat->sevSig, |
| 8925 | IDELEMS(strat->Shdl)*sizeof(unsigned long), |
| 8926 | (IDELEMS(strat->Shdl)+setmax) |
| 8927 | *sizeof(unsigned long)); |
| 8928 | strat->ecartS = (intset)omReallocSize(strat->ecartS, |
| 8929 | IDELEMS(strat->Shdl)*sizeof(int), |
| 8930 | (IDELEMS(strat->Shdl)+setmax) |
| 8931 | *sizeof(int)); |
| 8932 | strat->S_2_R = (int*) omRealloc0Size(strat->S_2_R, |
| 8933 | IDELEMS(strat->Shdl)*sizeof(int), |
| 8934 | (IDELEMS(strat->Shdl)+setmax) |
| 8935 | *sizeof(int)); |
| 8936 | if (strat->lenS!=NULL) |
| 8937 | strat->lenS=(int*)omRealloc0Size(strat->lenS, |
| 8938 | IDELEMS(strat->Shdl)*sizeof(int), |
| 8939 | (IDELEMS(strat->Shdl)+setmax) |
| 8940 | *sizeof(int)); |
| 8941 | if (strat->lenSw!=NULL) |
| 8942 | strat->lenSw=(wlen_type*)omRealloc0Size(strat->lenSw, |
| 8943 | IDELEMS(strat->Shdl)*sizeof(wlen_type), |
| 8944 | (IDELEMS(strat->Shdl)+setmax) |
| 8945 | *sizeof(wlen_type)); |
| 8946 | if (strat->fromQ!=NULL) |
| 8947 | { |
| 8948 | strat->fromQ = (intset)omReallocSize(strat->fromQ, |
| 8949 | IDELEMS(strat->Shdl)*sizeof(int), |
| 8950 | (IDELEMS(strat->Shdl)+setmax)*sizeof(int)); |
| 8951 | } |
| 8952 | pEnlargeSet(&strat->S,IDELEMS(strat->Shdl),setmax); |
| 8953 | pEnlargeSet(&strat->sig,IDELEMS(strat->Shdl),setmax); |
| 8954 | IDELEMS(strat->Shdl)+=setmax; |
| 8955 | strat->Shdl->m=strat->S; |
| 8956 | } |
| 8957 | // in a signature-based algorithm the following situation will never |
| 8958 | // appear due to the fact that the critical pairs are already sorted |
| 8959 | // by increasing signature. |
| 8960 | // True. However, in the case of integers we need to put the element |
| 8961 | // that caused the signature drop on the first position |
| 8962 | if (atS <= strat->sl) |
| 8963 | { |
| 8964 | #ifdef ENTER_USE_MEMMOVE |
| 8965 | memmove(&(strat->S[atS+1]), &(strat->S[atS]), |
| 8966 | (strat->sl - atS + 1)*sizeof(poly)); |
| 8967 | memmove(&(strat->sig[atS+1]), &(strat->sig[atS]), |
| 8968 | (strat->sl - atS + 1)*sizeof(poly)); |
| 8969 | memmove(&(strat->sevSig[atS+1]), &(strat->sevSig[atS]), |
| 8970 | (strat->sl - atS + 1)*sizeof(unsigned long)); |
| 8971 | memmove(&(strat->ecartS[atS+1]), &(strat->ecartS[atS]), |
nothing calls this directly
no test coverage detected