Changeset 172d852 in git for Singular/walk.cc
- Timestamp:
- Jan 24, 2019, 2:32:29 PM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 08394f319ba420091cccad7e025c3f7cac04c373
- Parents:
- 5abb79fd2458b47b21d297f2c8b26f285ac9546f756676ef1fcf4cff300fb1607a6d21293b253245
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-01-24 14:32:29+01:00
- git-committer:
- GitHub <noreply@github.com>2019-01-24 14:32:29+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/walk.cc
r5abb79f r172d852 78 78 #include "misc/mylimits.h" 79 79 80 int nstep;80 VAR int nstep; 81 81 82 82 extern BOOLEAN ErrorCheck(); 83 83 84 externBOOLEAN pSetm_error;84 EXTERN_VAR BOOLEAN pSetm_error; 85 85 86 86 void Set_Error( BOOLEAN f) { pSetm_error=f; } 87 87 88 BOOLEAN Overflow_Error = FALSE;89 90 #ifdef TIME_TEST 91 clock_t xtif, xtstd, xtlift, xtred, xtnw;92 clock_t xftostd, xtextra, xftinput, to;88 VAR BOOLEAN Overflow_Error = FALSE; 89 90 #ifdef TIME_TEST 91 VAR clock_t xtif, xtstd, xtlift, xtred, xtnw; 92 VAR clock_t xftostd, xtextra, xftinput, to; 93 93 #endif 94 94 … … 1509 1509 * compute a perturbed weight vector of a matrix order w.r.t. an ideal * 1510 1510 *************************************************************************/ 1511 int Xnlev;1511 VAR int Xnlev; 1512 1512 intvec* Mfpertvector(ideal G, intvec* ivtarget) 1513 1513 { … … 3656 3656 //mpz_out_str(stdout, 10, ndeg); 3657 3657 #endif 3658 mpz_t deg_tmp;3658 VAR mpz_t deg_tmp; 3659 3659 mpz_init_set(deg_tmp, ndeg); 3660 3660 3661 mpz_t *ivres=( mpz_t *) omAlloc(nV*sizeof(mpz_t));3661 VAR mpz_t *ivres=( mpz_t *) omAlloc(nV*sizeof(mpz_t)); 3662 3662 mpz_init_set_ui(ivres[nV-1],1); 3663 3663 … … 3668 3668 } 3669 3669 3670 mpz_t *ivtmp=(mpz_t *)omAlloc(nV*sizeof(mpz_t));3670 VAR mpz_t *ivtmp=(mpz_t *)omAlloc(nV*sizeof(mpz_t)); 3671 3671 for(i=0; i<nV; i++) 3672 3672 { 3673 3673 mpz_init(ivtmp[i]); 3674 3674 } 3675 mpz_t sing_int;3675 VAR mpz_t sing_int; 3676 3676 mpz_init_set_ui(sing_int, 2147483647); 3677 3677 3678 intvec* repr_vector = new intvec(nV);3678 VAR intvec* repr_vector = new intvec(nV); 3679 3679 3680 3680 // define ivtmp := ndeg^(n-1).w_1 + ndeg^(n-2).w_2 + ... + w_n … … 3695 3695 } 3696 3696 } 3697 delete ivMat;3698 3699 int ntrue=0;3697 VAR delete ivMat; 3698 3699 VAR int ntrue=0; 3700 3700 for(i=0; i<nV; i++) 3701 3701 { … … 3731 3731 mpz_clear(ndeg); 3732 3732 3733 return repr_vector;3733 VAR return repr_vector; 3734 3734 } 3735 3735 #endif … … 3780 3780 #endif 3781 3781 3782 mpz_t deg_tmp;3782 VAR mpz_t deg_tmp; 3783 3783 mpz_init_set(deg_tmp, ndeg); 3784 3784 3785 mpz_t *ivres=(mpz_t *)omAlloc(nV*sizeof(mpz_t));3785 VAR mpz_t *ivres=(mpz_t *)omAlloc(nV*sizeof(mpz_t)); 3786 3786 mpz_init_set_ui(ivres[nV-1], 1); 3787 3787 … … 3792 3792 } 3793 3793 3794 mpz_t sing_int;3794 VAR mpz_t sing_int; 3795 3795 mpz_init_set_ui(sing_int, 2147483647); 3796 3796 3797 intvec* repr_vector = new intvec(nV);3798 int ntrue=0;3797 VAR intvec* repr_vector = new intvec(nV); 3798 VAR int ntrue=0; 3799 3799 for(i=0; i<nV; i++) 3800 3800 { … … 3827 3827 mpz_clear(sing_int); 3828 3828 3829 return repr_vector;3829 VAR return repr_vector; 3830 3830 } 3831 3831 #endif … … 4503 4503 } 4504 4504 4505 int ngleich;4506 intvec* Xsigma;4507 intvec* Xtau;4508 int xn;4509 intvec* Xivinput;4510 intvec* Xivlp;4505 VAR int ngleich; 4506 VAR intvec* Xsigma; 4507 VAR intvec* Xtau; 4508 VAR int xn; 4509 VAR intvec* Xivinput; 4510 VAR intvec* Xivlp; 4511 4511 4512 4512 … … 6925 6925 } 6926 6926 6927 intvec* XivNull;6927 VAR intvec* XivNull; 6928 6928 6929 6929 /***************************** … … 6942 6942 } 6943 6943 6944 int nnflow;6945 int Xcall;6946 int Xngleich;6944 VAR int nnflow; 6945 VAR int Xcall; 6946 VAR int Xngleich; 6947 6947 6948 6948 /*********************************************************************** … … 8835 8835 8836 8836 #ifdef TIME_TEST 8837 clock_t tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0, textra=0;8838 clock_t tinput = clock();8839 #endif 8840 int nsteppert=0, i, nV = currRing->N, nwalk=0, npert_tmp=0;8841 int *npert=(int*)omAlloc(2*nV*sizeof(int));8842 ideal Gomega, M,F, G1, Gomega1, Gomega2, M1, F1;8837 VAR clock_t tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0, textra=0; 8838 VAR clock_t tinput = clock(); 8839 #endif 8840 VAR int nsteppert=0, i, nV = currRing->N, nwalk=0, npert_tmp=0; 8841 VAR int *npert=(int*)omAlloc(2*nV*sizeof(int)); 8842 INST_VAR ideal Gomega, M,F, G1, Gomega1, Gomega2, M1, F1; 8843 8843 //ring endRing; 8844 ring newRing, oldRing, lpRing;8845 intvec* next_weight;8846 intvec* ivNull = new intvec(nV); //define (0,...,0)8847 intvec* iv_dp = MivUnit(nV);// define (1,1,...,1)8848 intvec* iv_lp = Mivlp(nV); //define (1,0,...,0)8849 ideal H0;8844 VAR ring newRing, oldRing, lpRing; 8845 VAR intvec* next_weight; 8846 VAR intvec* ivNull = new intvec(nV); //define (0,...,0) 8847 VAR intvec* iv_dp = MivUnit(nV);// define (1,1,...,1) 8848 VAR intvec* iv_lp = Mivlp(nV); //define (1,0,...,0) 8849 INST_VAR ideal H0; 8850 8850 //ideal H1; 8851 ideal H2, Glp;8852 int weight_norm, nGB, endwalks = 0, nwalkpert=0, npertstep=0;8853 intvec* Mlp = MivMatrixOrderlp(nV);8854 intvec* vector_tmp = new intvec(nV);8851 INST_VAR ideal H2, Glp; 8852 VAR int weight_norm, nGB, endwalks = 0, nwalkpert=0, npertstep=0; 8853 VAR intvec* Mlp = MivMatrixOrderlp(nV); 8854 VAR intvec* vector_tmp = new intvec(nV); 8855 8855 #ifndef BUCHBERGER_ALG 8856 intvec* hilb_func;8856 VAR intvec* hilb_func; 8857 8857 #endif 8858 8858 // to avoid (1,0,...,0) as the target vector 8859 intvec* last_omega = new intvec(nV);8859 VAR intvec* last_omega = new intvec(nV); 8860 8860 for(i=nV-1; i>0; i--) 8861 8861 { … … 8865 8865 8866 8866 //intvec* extra_curr_weight = new intvec(nV); 8867 intvec* target_weight = new intvec(nV);8867 VAR intvec* target_weight = new intvec(nV); 8868 8868 for(i=nV-1; i>=0; i--) 8869 8869 { 8870 8870 (*target_weight)[i] = (*target_tmp)[i]; 8871 8871 } 8872 ring XXRing = currRing;8872 VAR ring XXRing = currRing; 8873 8873 newRing = currRing; 8874 8874 … … 8901 8901 8902 8902 #ifdef REPRESENTATION_OF_SIGMA 8903 ideal Gw = MwalkInitialForm(G, curr_weight);8903 INST_VAR ideal Gw = MwalkInitialForm(G, curr_weight); 8904 8904 8905 8905 if(islengthpoly2(Gw)==1) … … 8942 8942 8943 8943 idDelete(&Gw); 8944 delete iv_dp;8944 VAR delete iv_dp; 8945 8945 #endif 8946 8946 … … 9355 9355 FINISH: 9356 9356 delete ivNull; 9357 delete next_weight;9358 delete iv_lp;9357 VAR delete next_weight; 9358 VAR delete iv_lp; 9359 9359 omFree(npert); 9360 9360
Note: See TracChangeset
for help on using the changeset viewer.