Changeset d96b79 in git for IntegerProgramming/matrix.cc


Ignore:
Timestamp:
Apr 14, 2003, 10:16:22 AM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
42c03ae4b5550eede82d007996fbc1809c919081
Parents:
a7c8b18aaee6ef15b1855f3bbd8d65f0c06f27b6
Message:
* Stefan Wolf (wolfs@in.tum.de): gcc 3.2.2 port


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

Legend:

Unmodified
Added
Removed
  • IntegerProgramming/matrix.cc

    ra7c8b18 rd96b79  
    320320    M[i]=0;
    321321    for(short j=0;j<columns;j++)
    322       if(H[i][j]==0)
     322      if(H[i][j]==(const BigInt&)0)
    323323        M[i]++;
    324324  }
     
    348348  short min_index=-1;
    349349  for(short i=0;i<_kernel_dimension;i++)
    350     if(M[i]>0)
     350    if(M[i]>(const BigInt&)0)
    351351      if(min_index==-1)
    352352        min_index=i;
     
    385385    BOOLEAN found=TRUE;
    386386    for(short j=0;j<columns;j++)
    387       if(H[0][j]==0)
     387      if(H[0][j]==(const BigInt&)0)
    388388        found=FALSE;
    389389
     
    405405
    406406    for(short j=0;j<columns;j++)
    407       if(H[0][j]==0)
     407      if(H[0][j]==(const BigInt&)0)
    408408      {
    409409        remaining_zero_components++;
    410410        for(short i=current_position;i<_kernel_dimension;i++)
    411           if(H[i][j]==0)
     411          if(H[i][j]==(const BigInt&)0)
    412412            M[i]++;
    413413      }
     
    421421        min=M[i];
    422422
    423     if(min==remaining_zero_components)
     423    if(min==(const BigInt&)remaining_zero_components)
    424424      // all zero components in H[0] are zero in each remaining vector
    425425      // => desired vector does not exist
     
    442442    short min_index=0;
    443443    for(short i=current_position;i<_kernel_dimension;i++)
    444       if(M[i]>0)
     444      if(M[i]>(const BigInt&)0)
    445445        if(min_index==0)
    446446          min_index=i;
     
    477477      // mult*H[current_position]
    478478      for(short j=0;j<columns;j++)
    479         if(H[0][j]!=0)
    480           if(H[0][j]+mult*H[current_position][j]==0)
     479        if(H[0][j]!=(const BigInt&)0)
     480          if(H[0][j]+(const BigInt&)mult*H[current_position][j]
     481            ==(const BigInt&)0)
    481482            found=FALSE;
    482483
    483484      if(found==TRUE)
    484485        for(short j=0;j<columns;j++)
    485           H[0][j]+=mult*H[current_position][j];
    486 
     486          H[0][j]+=(const BigInt&)mult*H[current_position][j];
    487487      else
    488488        // try -mult
     
    494494        // mult*H[current_position]
    495495        for(short j=0;j<columns;j++)
    496           if(H[0][j]!=0)
    497             if(H[0][j]-mult*H[current_position][j]==0)
     496          if(H[0][j]!=(const BigInt&)0)
     497            if(H[0][j]-(const BigInt&)mult*H[current_position][j]
     498              ==(const BigInt&)0)
    498499              found=FALSE;
    499500
    500501        if(found==TRUE)
    501502          for(short j=0;j<columns;j++)
    502             H[0][j]-=mult*H[current_position][j];
     503            H[0][j]-=(const BigInt&)mult*H[current_position][j];
    503504      }
    504 
    505505    }
    506 
    507   }
    508 
     506  }
    509507
    510508// When reaching this line, an error must have occurred.
    511509  cerr<<"FATAL ERROR in short matrix::compute_nonnegative_vector()"<<endl;
    512510  abort();
    513 
    514 }
    515 
    516 
    517 
     511}
    518512
    519513short matrix::compute_flip_variables(short*& F)
     
    538532
    539533  for(short j=0;j<columns;j++)
    540     if(H[0][j]<0)
     534    if(H[0][j]<(const BigInt&)0)
    541535      r++;
    542536  // remember that all components of H[0] are !=0
     
    555549    short counter=0;
    556550    for(short j=0;j<columns;j++)
    557       if(H[0][j]>0)
     551      if(H[0][j]>(const BigInt&)0)
    558552      {
    559553        F[counter]=j;
     
    569563    short counter=0;
    570564    for(short j=0;j<columns;j++)
    571       if(H[0][j]<0)
     565      if(H[0][j]<(const BigInt&)0)
    572566      {
    573567        F[counter]=j;
     
    629623      if(ideal_saturated_by_var[j]==FALSE)
    630624      {
    631         if(H[k][j]>0)
     625        if(H[k][j]>(const BigInt&)0)
    632626          pos_sat_var++;
    633627        else
    634           if(H[k][j]<0)
     628          if(H[k][j]<(const BigInt&)0)
    635629            neg_sat_var++;
    636630      }
     
    643637      for(short j=0;j<columns;j++)
    644638        if(ideal_saturated_by_var[j]==FALSE)
    645           if(H[k][j]>0)
     639          if(H[k][j]>(const BigInt&)0)
    646640            // ideal has to be saturated by the variables corresponding
    647641            // to positive components
     
    652646          }
    653647          else
    654             if(H[k][j]<0)
     648            if(H[k][j]<(const BigInt&)0)
    655649              // then the ideal is automatically saturated by the variables
    656650              // corresponding to negative components
     
    661655      for(short j=0;j<columns;j++)
    662656        if(ideal_saturated_by_var[j]==FALSE)
    663           if(H[k][j]<0)
     657          if(H[k][j]<(const BigInt&)0)
    664658            // ideal has to be saturated by the variables corresponding
    665659            // to negative components
     
    670664          }
    671665          else
    672             if(H[k][j]>0)
     666            if(H[k][j]>(const BigInt&)0)
    673667              // then the ideal is automatically saturated by the variables
    674668              // corresponding to positive components
Note: See TracChangeset for help on using the changeset viewer.