Changeset f9fde8 in git
 Timestamp:
 Jan 20, 2022, 3:19:54 PM (16 months ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
 Children:
 908d1f167af74acb9bca8213230d13d6c99501f5
 Parents:
 7be1d21a7379ce28be9574c8b6e13800001a7653
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libpolys/polys/flintconv.cc
r7be1d2 rf9fde8 353 353 { 354 354 poly h=MATELEM(m,i,j); 355 if (h==NULL) 356 nmod_mat_entry(M,i1,j1)=0; 357 else 355 if (h!=NULL) 358 356 nmod_mat_entry(M,i1,j1)=(long)pGetCoeff(h); 359 357 } … … 380 378 int c=m>cols(); 381 379 int i,j; 382 matrix M= mpNew(r,c);380 matrix M=NULL; 383 381 if (rField_is_Q(R)) 384 382 { 385 383 fmpq_mat_t FLINTM; 386 384 fmpq_mat_init(FLINTM,r,c); 387 number n=n_Init(0,R>cf);385 M=mpNew(r,c); 388 386 for(i=r;i>0;i) 389 387 { … … 401 399 } 402 400 } 403 n_Delete(&n,R>cf);404 401 fmpq_mat_rref(FLINTM,FLINTM); 405 402 for(i=r;i>0;i) … … 407 404 for(j=c;j>0;j) 408 405 { 409 n =convFlintNSingN(fmpq_mat_entry(FLINTM,i1,j1),R>cf);406 number n=convFlintNSingN(fmpq_mat_entry(FLINTM,i1,j1),R>cf); 410 407 MATELEM(M,i,j)=p_NSet(n,R); 411 408 } … … 417 414 nmod_mat_t FLINTM; 418 415 // convert matrix 419 convSingMFlintNmod_mat( M,FLINTM,R);416 convSingMFlintNmod_mat(m,FLINTM,R); 420 417 // rank 421 418 long rk= nmod_mat_rref (FLINTM); … … 456 453 fmpq_mat_t FLINTM; 457 454 fmpq_mat_init(FLINTM,r,c); 458 for(j=c ;j>0;j)455 for(j=c1;j>=0;j) 459 456 { 460 457 poly h=m>m[j]; … … 463 460 i=p_GetComp(h,R); 464 461 if (p_Totaldegree(h,R)==0) 465 convSingNFlintN(fmpq_mat_entry(FLINTM,i1,j 1),p_GetCoeff(h,R),R>cf);462 convSingNFlintN(fmpq_mat_entry(FLINTM,i1,j),p_GetCoeff(h,R),R>cf); 466 463 else 467 464 { … … 475 472 for(i=r;i>0;i) 476 473 { 477 for(j=c ;j>0;j)478 { 479 number n=convFlintNSingN(fmpq_mat_entry(FLINTM,i1,j 1),R>cf);474 for(j=c1;j>=0;j) 475 { 476 number n=convFlintNSingN(fmpq_mat_entry(FLINTM,i1,j),R>cf); 480 477 if(!n_IsZero(n,R>cf)) 481 478 { … … 492 489 nmod_mat_t FLINTM; 493 490 nmod_mat_init(FLINTM,r,c,rChar(R)); 494 for(j=c ;j>0;j)491 for(j=c1;j>=0;j) 495 492 { 496 493 poly h=m>m[j]; … … 499 496 i=p_GetComp(h,R); 500 497 if (p_Totaldegree(h,R)==0) 501 nmod_mat_entry(FLINTM,i1,j 1)=(long)p_GetCoeff(h,R);498 nmod_mat_entry(FLINTM,i1,j)=(long)p_GetCoeff(h,R); 502 499 else 503 500 { … … 511 508 for(i=r;i>0;i) 512 509 { 513 for(j=c ;j>0;j)514 { 515 number n=n_Init(nmod_mat_entry(FLINTM,i1,j 1),R>cf);510 for(j=c1;j>=0;j) 511 { 512 number n=n_Init(nmod_mat_entry(FLINTM,i1,j),R>cf); 516 513 if(!n_IsZero(n,R>cf)) 517 514 {
Note: See TracChangeset
for help on using the changeset viewer.