Changeset f07fec in git for IntegerProgramming/matrix.cc
- Timestamp:
- Feb 4, 2014, 12:54:15 AM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 9bc6bcbce12e05ef128c69bb444e6d03f1fd2ff0
- Parents:
- 994c3dc99d02ae0db55a193692a2e41b6a562bcd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
IntegerProgramming/matrix.cc
r994c3d rf07fec 351 351 for(int i=0;i<_kernel_dimension;i++) 352 352 if(M[i]>BigInt(0)) 353 { 353 354 if(min_index==-1) 354 355 min_index=i; 355 else 356 if(M[i]<M[min_index])357 min_index=i;356 else if(M[i]<M[min_index]) 357 min_index=i; 358 } 358 359 359 360 // Now, H[min_index] is the vector to be transformed into a nonnegative one. … … 445 446 for(int i=current_position;i<_kernel_dimension;i++) 446 447 if(M[i]>BigInt(0)) 448 { 447 449 if(min_index==0) 448 450 min_index=i; 449 else 450 if(M[i]<M[min_index])451 min_index=i;451 else if(M[i]<M[min_index]) 452 min_index=i; 453 } 452 454 453 455 // Now, a multiple of H[min_index] will be added to the already constructed … … 639 641 for(int j=0;j<columns;j++) 640 642 if(ideal_saturated_by_var[j]==FALSE) 643 { 641 644 if(H[k][j]> BigInt(0)) 642 645 // ideal has to be saturated by the variables corresponding … … 647 650 number_of_sat_var++; 648 651 } 649 else 650 if(H[k][j]< BigInt(0)) 652 else if(H[k][j]< BigInt(0)) 651 653 // then the ideal is automatically saturated by the variables 652 654 // corresponding to negative components 653 655 ideal_saturated_by_var[j]=TRUE; 656 } 654 657 } 655 658 else … … 657 660 for(int j=0;j<columns;j++) 658 661 if(ideal_saturated_by_var[j]==FALSE) 662 { 659 663 if(H[k][j]< BigInt(0)) 660 664 // ideal has to be saturated by the variables corresponding … … 665 669 number_of_sat_var++; 666 670 } 667 else 668 if(H[k][j]> BigInt(0)) 671 else if(H[k][j]> BigInt(0)) 669 672 // then the ideal is automatically saturated by the variables 670 673 // corresponding to positive components 671 674 ideal_saturated_by_var[j]=TRUE; 675 } 672 676 } 673 677 }
Note: See TracChangeset
for help on using the changeset viewer.