Changeset 57bd83 in git
- Timestamp:
- Mar 18, 2019, 12:38:54 PM (5 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- c854b9a4ef6bb168095febb6c5bb20cf579a7ff4
- Parents:
- 4188f03ab0bc2bf245e4e875fb777183ee3802ce
- Location:
- libpolys/polys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/flintconv.cc
r4188f03 r57bd83 96 96 } 97 97 98 void convSingPFlintP(fmpq_poly_t res, poly p, const ring r) 99 { 100 int d=p_GetExp(p,1,r); 101 fmpq_poly_init2(res,d+1); 102 _fmpq_poly_set_length (res, d + 1); 103 while(p!=NULL) 104 { 105 number n=pGetCoeff(p); 106 fmpq_t c; 107 convSingNFlintN(c,n); 108 fmpq_poly_set_coeff_fmpq(res,p_GetExp(p,1,r),c); 109 fmpq_clear(c); 110 pIter(p); 111 } 112 } 113 114 poly convFlintPSingP(fmpq_poly_t f, const ring r) 115 { 116 int d=fmpq_poly_length(f); 117 poly p=NULL; 118 for(int i=0; i<=d; i++) 119 { 120 fmpq_t c; 121 fmpq_poly_get_coeff_fmpq(c,f,i); 122 number n=convFlintNSingN(c); 123 poly pp=p_Init(r); 124 pSetCoeff0(pp,n); 125 p_SetExp(pp,1,i,r); 126 p_Setm(pp,r); 127 p=p_Add_q(p,pp,r); 128 } 129 return p; 130 } 98 131 99 132 bigintmat* singflint_LLL(bigintmat* m, bigintmat* T) -
libpolys/polys/flintconv.h
r4188f03 r57bd83 34 34 #include <flint/fmpq.h> 35 35 #include <flint/fmpz_poly.h> 36 #include <flint/fmpq_poly.h> 36 37 #include <flint/fmpz_poly_mat.h> 37 38 #include <flint/fmpz_lll.h> … … 45 46 number convFlintNSingN (fmpz_t f); 46 47 number convFlintNSingN (fmpq_t f); 48 void convSingPFlintP(fmpq_poly_t res, poly p, const ring r); 49 poly convFlintPSingP(fmpq_poly_t f, const ring r); 47 50 48 51 bigintmat* singflint_LLL(bigintmat* A, bigintmat* T);
Note: See TracChangeset
for help on using the changeset viewer.