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

Function TranPertVector_lp

Singular/walk.cc:3740–3831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3738//unused
3739#if 0
3740static intvec* TranPertVector_lp(ideal G)
3741{
3742 BOOLEAN nError = Overflow_Error;
3743 Overflow_Error = FALSE;
3744 // int j, nG = IDELEMS(G);
3745 int i;
3746 int nV = currRing->N;
3747
3748 // define the maximal total degree of polynomials of G
3749 mpz_t ndeg;
3750 mpz_init(ndeg);
3751
3752 // 12 Juli 03
3753#ifndef UPPER_BOUND
3754 mpz_set_si(ndeg, Trandegreebound(G)+1);
3755#else
3756 mpz_t ztmp;
3757 mpz_init(ztmp);
3758
3759 mpz_t maxdeg;
3760 mpz_init_set_si(maxdeg, Trandegreebound(G));
3761
3762 //ndeg = (2*maxdeg*maxdeg + (nV+1)*maxdeg);//Kalkbrenner (1999)
3763 mpz_pow_ui(ztmp, maxdeg, 2);
3764 mpz_mul_ui(ztmp, ztmp, 2);
3765 mpz_mul_ui(maxdeg, maxdeg, nV+1);
3766 mpz_add(ndeg, ztmp, maxdeg);
3767 // PrintS("\n// with the new upper degree bound (2d^2+(n+1)d)*m ");
3768 // Print("\n// where d = %d, n = %d and bound = %d",
3769 // mpz_get_si(maxdeg), nV, mpz_get_si(ndeg));
3770
3771 mpz_clear(ztmp);
3772
3773#endif
3774
3775#ifdef INVEPS_SMALL_IN_TRAN
3776 if(mpz_cmp_ui(ndeg, nV)>0 && nV > 3)
3777 mpz_cdiv_q_ui(ndeg, ndeg, nV);
3778
3779 //PrintS("\n// choose the \"small\" inverse epsilon:");
3780 // mpz_out_str(stdout, 10, ndeg);
3781#endif
3782
3783 VAR mpz_t deg_tmp;
3784 mpz_init_set(deg_tmp, ndeg);
3785
3786 VAR mpz_t *ivres=(mpz_t *)omAlloc(nV*sizeof(mpz_t));
3787 mpz_init_set_ui(ivres[nV-1], 1);
3788
3789 for(i=nV-2; i>=0; i--)
3790 {
3791 mpz_init_set(ivres[i], deg_tmp);
3792 mpz_mul(deg_tmp, deg_tmp, ndeg);
3793 }
3794
3795 VAR mpz_t sing_int;
3796 mpz_init_set_ui(sing_int, 2147483647);
3797

Callers

nothing calls this directly

Calls 3

PrintSFunction · 0.85
ivStringFunction · 0.85
PrintFunction · 0.50

Tested by

no test coverage detected