Changeset f07fec in git for IntegerProgramming/matrix.cc


Ignore:
Timestamp:
Feb 4, 2014, 12:54:15 AM (10 years ago)
Author:
Max Horn <max@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9bc6bcbce12e05ef128c69bb444e6d03f1fd2ff0
Parents:
994c3dc99d02ae0db55a193692a2e41b6a562bcd
Message:
Silence compiler warnings about ambiguous looking 'else'
File:
1 edited

Legend:

Unmodified
Added
Removed
  • IntegerProgramming/matrix.cc

    r994c3d rf07fec  
    351351  for(int i=0;i<_kernel_dimension;i++)
    352352    if(M[i]>BigInt(0))
     353    {
    353354      if(min_index==-1)
    354355        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    }
    358359
    359360  // Now, H[min_index] is the vector to be transformed into a nonnegative one.
     
    445446    for(int i=current_position;i<_kernel_dimension;i++)
    446447      if(M[i]>BigInt(0))
     448      {
    447449        if(min_index==0)
    448450          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      }
    452454
    453455    // Now, a multiple of H[min_index] will be added to the already constructed
     
    639641      for(int j=0;j<columns;j++)
    640642        if(ideal_saturated_by_var[j]==FALSE)
     643        {
    641644          if(H[k][j]> BigInt(0))
    642645            // ideal has to be saturated by the variables corresponding
     
    647650            number_of_sat_var++;
    648651          }
    649           else
    650             if(H[k][j]< BigInt(0))
     652          else if(H[k][j]< BigInt(0))
    651653              // then the ideal is automatically saturated by the variables
    652654              // corresponding to negative components
    653655              ideal_saturated_by_var[j]=TRUE;
     656        }
    654657    }
    655658    else
     
    657660      for(int j=0;j<columns;j++)
    658661        if(ideal_saturated_by_var[j]==FALSE)
     662        {
    659663          if(H[k][j]< BigInt(0))
    660664            // ideal has to be saturated by the variables corresponding
     
    665669            number_of_sat_var++;
    666670          }
    667           else
    668             if(H[k][j]> BigInt(0))
     671          else if(H[k][j]> BigInt(0))
    669672              // then the ideal is automatically saturated by the variables
    670673              // corresponding to positive components
    671674              ideal_saturated_by_var[j]=TRUE;
     675        }
    672676    }
    673677  }
Note: See TracChangeset for help on using the changeset viewer.