Changeset 4dcfb4f in git
 Timestamp:
 Jan 21, 2005, 5:16:16 PM (18 years ago)
 Branches:
 (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
 Children:
 1b61353ce8e537757677d798cb81d4f53609e999
 Parents:
 a70d5e8c3b16c9476e9db55b342df53dac31b1bb
 Location:
 IntegerProgramming
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

IntegerProgramming/LLL.cc
ra70d5e r4dcfb4f 160 160 BigInt _lambda=lambda[k][k1]; 161 161 162 if(_lambda== (const BigInt&)0)162 if(_lambda==BigInt(0)) 163 163 { 164 164 d[k]=d[k1]; … … 235 235 236 236 for(short m=0;m<vector_dimension;m++) 237 if(b[0][m]!= (const BigInt&)0)237 if(b[0][m]!=BigInt(0)) 238 238 // nonzero entry detected 239 239 r=0; … … 296 296 // Now, H equals the matrix I_(number_of_vectors). 297 297 298 if(t!= (const BigInt&)0)298 if(t!=BigInt(0)) 299 299 { 300 300 d[1]=t; … … 343 343 else 344 344 // j==k 345 if(u!= (const BigInt&)0)345 if(u!=BigInt(0)) 346 346 { 347 347 d[k+1]=u; … … 532 532 } 533 533 534 if(d[k+1]== (const BigInt&)0)534 if(d[k+1]==BigInt(0)) 535 535 { 536 536 cerr<<"\nERROR: void integral_LLL(BigInt**, const short&, const " 
IntegerProgramming/matrix.cc
ra70d5e r4dcfb4f 322 322 M[i]=0; 323 323 for(short j=0;j<columns;j++) 324 if(H[i][j]== (const BigInt&)0)324 if(H[i][j]==BigInt(0)) 325 325 M[i]++; 326 326 } … … 350 350 short min_index=1; 351 351 for(short i=0;i<_kernel_dimension;i++) 352 if(M[i]> (const BigInt&)0)352 if(M[i]>BigInt(0)) 353 353 if(min_index==1) 354 354 min_index=i; … … 387 387 BOOLEAN found=TRUE; 388 388 for(short j=0;j<columns;j++) 389 if(H[0][j]== (const BigInt&)0)389 if(H[0][j]==BigInt(0)) 390 390 found=FALSE; 391 391 … … 407 407 408 408 for(short j=0;j<columns;j++) 409 if(H[0][j]== (const BigInt&)0)409 if(H[0][j]==BigInt(0)) 410 410 { 411 411 remaining_zero_components++; 412 412 for(short i=current_position;i<_kernel_dimension;i++) 413 if(H[i][j]== (const BigInt&)0)413 if(H[i][j]==BigInt(0)) 414 414 M[i]++; 415 415 } … … 444 444 short min_index=0; 445 445 for(short i=current_position;i<_kernel_dimension;i++) 446 if(M[i]> (const BigInt&)0)446 if(M[i]>BigInt(0)) 447 447 if(min_index==0) 448 448 min_index=i; … … 479 479 // mult*H[current_position] 480 480 for(short j=0;j<columns;j++) 481 if(H[0][j]!= (const BigInt&)0)481 if(H[0][j]!=BigInt(0)) 482 482 if(H[0][j]+(const BigInt&)mult*H[current_position][j] 483 == (const BigInt&)0)483 ==BigInt(0)) 484 484 found=FALSE; 485 485 … … 496 496 // mult*H[current_position] 497 497 for(short j=0;j<columns;j++) 498 if(H[0][j]!= (const BigInt&)0)498 if(H[0][j]!=BigInt(0)) 499 499 if(H[0][j](const BigInt&)mult*H[current_position][j] 500 == (const BigInt&)0)500 ==BigInt(0)) 501 501 found=FALSE; 502 502 … … 534 534 535 535 for(short j=0;j<columns;j++) 536 if(H[0][j]< (const BigInt&)0)536 if(H[0][j]<BigInt(0)) 537 537 r++; 538 538 // remember that all components of H[0] are !=0 … … 551 551 short counter=0; 552 552 for(short j=0;j<columns;j++) 553 if(H[0][j]> (const BigInt&)0)553 if(H[0][j]> BigInt(0)) 554 554 { 555 555 F[counter]=j; … … 565 565 short counter=0; 566 566 for(short j=0;j<columns;j++) 567 if(H[0][j]< (const BigInt&)0)567 if(H[0][j]< BigInt(0)) 568 568 { 569 569 F[counter]=j; … … 625 625 if(ideal_saturated_by_var[j]==FALSE) 626 626 { 627 if(H[k][j]> (const BigInt&)0)627 if(H[k][j]> BigInt(0)) 628 628 pos_sat_var++; 629 629 else 630 if(H[k][j]< (const BigInt&)0)630 if(H[k][j]< BigInt(0)) 631 631 neg_sat_var++; 632 632 } … … 639 639 for(short j=0;j<columns;j++) 640 640 if(ideal_saturated_by_var[j]==FALSE) 641 if(H[k][j]> (const BigInt&)0)641 if(H[k][j]> BigInt(0)) 642 642 // ideal has to be saturated by the variables corresponding 643 643 // to positive components … … 648 648 } 649 649 else 650 if(H[k][j]< (const BigInt&)0)650 if(H[k][j]< BigInt(0)) 651 651 // then the ideal is automatically saturated by the variables 652 652 // corresponding to negative components … … 657 657 for(short j=0;j<columns;j++) 658 658 if(ideal_saturated_by_var[j]==FALSE) 659 if(H[k][j]< (const BigInt&)0)659 if(H[k][j]< BigInt(0)) 660 660 // ideal has to be saturated by the variables corresponding 661 661 // to negative components … … 666 666 } 667 667 else 668 if(H[k][j]> (const BigInt&)0)668 if(H[k][j]> BigInt(0)) 669 669 // then the ideal is automatically saturated by the variables 670 670 // corresponding to positive components
Note: See TracChangeset
for help on using the changeset viewer.