Changeset 1bbaa1 in git


Ignore:
Timestamp:
May 19, 2000, 3:05:54 PM (23 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
60f2ab568299f910ca263722982843a8d9e49653
Parents:
754cf997b0bc052e7097b430776ff2a512e1dfa5
Message:
* unshadow i


git-svn-id: file:///usr/local/Singular/svn/trunk@4358 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • IntegerProgramming/IP_algorithms.cc

    r754cf99 r1bbaa1  
    22522252
    22532253  float *hom_grad=new float[variables];
    2254 
    2255   for(short i=0;i<variables;i++)
    2256   {
    2257     input>>hom_grad[i];
     2254 
     2255  for(short _i=0;_i<variables;_i++)
     2256  {
     2257    input>>hom_grad[_i];
    22582258
    22592259    if(!input)
     
    22672267    }
    22682268
    2269     if(hom_grad[i]<=0)
     2269    if(hom_grad[_i]<=0)
    22702270    {
    22712271      cerr<<"ERROR: int Bigatti_LaScala_Robbiano(INPUT_FILE, const BOOLEAN&):"
     
    22762276    }
    22772277  }
     2278 
    22782279
    22792280
     
    30853086    {
    30863087      // at the beginning, the variables of interest are zero
    3087       for(short i=0;i<weighted_variables;i++)
     3088      for(i=0;i<weighted_variables;i++)
    30883089        right_hand[i]=0;
    30893090
    30903091      // right hand vector is read from the input stream into the
    30913092      // elimination variables
    3092       for(short i=weighted_variables;
     3093      for(i=weighted_variables;
    30933094          i<weighted_variables+elimination_variables-1;i++)
    30943095      {
     
    31083109      // - min{negative components of right_hand}.
    31093110      Integer min=0;
    3110       for(short i=weighted_variables;
     3111      for(i=weighted_variables;
    31113112          i<weighted_variables+elimination_variables-1;i++)
    31123113        if(right_hand[i]<min)
     
    31153116      // transform right_hand so that all components are nonnegative
    31163117      if(min<0)
    3117         for(short i=weighted_variables;
     3118        for(i=weighted_variables;
    31183119            i<weighted_variables+elimination_variables-1;i++)
    31193120          right_hand[i]-=min;
     
    31393140
    31403141      output<<"right hand vector:"<<endl;
    3141       for(short i=weighted_variables;
     3142      for(i=weighted_variables;
    31423143          i<weighted_variables+elimination_variables-1;i++)
    31433144        output<<setw(6)<<right_hand[i]+min;
     
    31483149
    31493150      BOOLEAN solvable=TRUE;
    3150       for(short i=weighted_variables;
     3151      for(i=weighted_variables;
    31513152          i<=weighted_variables+elimination_variables-1;i++)
    31523153        if(to_reduce[i]!=0)
     
    31603161        output<<"YES"<<endl;
    31613162        output<<"optimal solution:"<<endl;
    3162         for(short i=0;i<weighted_variables;i++)
     3163        for(i=0;i<weighted_variables;i++)
    31633164          output<<setw(6)<<to_reduce[i];
    31643165        output<<endl;
     
    31923193      {
    31933194        // at the beginning, the variables of interest are zero
    3194         for(short i=0;i<weighted_variables;i++)
     3195        for(i=0;i<weighted_variables;i++)
    31953196          right_hand[i]=0;
    31963197
    31973198        // right hand vector is read from the input stream into the
    31983199        // elimination variables
    3199         for(short i=weighted_variables;
     3200        for(i=weighted_variables;
    32003201            i<weighted_variables+elimination_variables;i++)
    32013202        {
     
    32463247
    32473248        output<<"right hand vector:"<<endl;
    3248         for(short i=weighted_variables;
     3249        for(i=weighted_variables;
    32493250            i<weighted_variables+elimination_variables;i++)
    32503251          output<<setw(6)<<right_hand[i];
     
    32553256
    32563257        BOOLEAN solvable=TRUE;
    3257         for(short i=weighted_variables;
     3258        for(i=weighted_variables;
    32583259            i<weighted_variables+elimination_variables;i++)
    32593260          if(to_reduce[i]!=0)
     
    32673268          output<<"YES"<<endl;
    32683269          output<<"optimal solution:"<<endl;
    3269           for(short i=0;i<weighted_variables;i++)
     3270          for(i=0;i<weighted_variables;i++)
    32703271            output<<setw(6)<<to_reduce[i];
    32713272          output<<endl;
     
    32983299        // initial solution vector is read from the input stream into the
    32993300        // elimination variables
    3300         for(short i=0;i<weighted_variables;i++)
     3301        for(i=0;i<weighted_variables;i++)
    33013302        {
    33023303          problem>>initial_solution[i];
     
    33333334
    33343335        output<<"initial solution vector:"<<endl;
    3335         for(short i=0;i<weighted_variables;i++)
     3336        for(i=0;i<weighted_variables;i++)
    33363337          output<<setw(6)<<initial_solution[i];
    33373338        // original vector
     
    33393340
    33403341        output<<"optimal solution:"<<endl;
    3341         for(short i=0;i<weighted_variables;i++)
     3342        for(i=0;i<weighted_variables;i++)
    33423343          output<<setw(6)<<to_reduce[i];
    33433344        output<<endl;
Note: See TracChangeset for help on using the changeset viewer.