Changeset 1072 for branches


Ignore:
Timestamp:
Aug 9, 2007 3:51:21 PM (12 years ago)
Author:
jpfasano
Message:

Modified to remove MS Compiler messages:

ClpDynamicMatrix?.cpp
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(182) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(185) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(192) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(199) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(206) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(208) : warning C4305: '=' : truncation from 'double' to 'float'
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(213) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicmatrix.cpp(215) : warning C4305: '=' : truncation from 'double' to 'float'
ClpDynamicExampleMatrix?.cpp
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(126) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(129) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(136) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(148) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(189) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(209) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(341) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(362) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
d:\coin\coinall-trunk\clp\src\clpdynamicexamplematrix.cpp(650) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data

Attempted to follow John's instructions/guidance.

Location:
branches/BSP/trunk/Clp/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/BSP/trunk/Clp/src/ClpDynamicExampleMatrix.cpp

    r754 r1072  
    9494  // and size correctly
    9595  row_ = new int [maximumElements_];
    96   element_ = new float [maximumElements_];
     96  element_ = new double [maximumElements_];
    9797  startColumn_ = new CoinBigIndex [maximumGubColumns_+1];
    9898  // say no columns yet
    9999  numberGubColumns_=0;
    100100  startColumn_[0]=0;
    101   cost_ = new float[maximumGubColumns_];
     101  cost_ = new double[maximumGubColumns_];
    102102  dynamicStatus_ = new unsigned char [maximumGubColumns_];
    103103  memset(dynamicStatus_,0,maximumGubColumns_);
    104104  id_ = new int[maximumGubColumns_];
    105105  if (columnLower)
    106     columnLower_ = new float[maximumGubColumns_];
     106    columnLower_ = new double[maximumGubColumns_];
    107107  else
    108108    columnLower_ = NULL;
    109109  if (columnUpper)
    110     columnUpper_ = new float[maximumGubColumns_];
     110    columnUpper_ = new double[maximumGubColumns_];
    111111  else
    112112    columnUpper_=NULL;
     
    122122  CoinBigIndex numberElements = startColumnGen_[numberColumns_];
    123123  rowGen_ = ClpCopyOfArray(row,numberElements);
    124   elementGen_ = new float[numberElements];
     124  elementGen_ = new double[numberElements];
    125125  for (i=0;i<numberElements;i++)
    126126    elementGen_[i]=element[i];
    127   costGen_ = new float[numberColumns_];
     127  costGen_ = new double[numberColumns_];
    128128  for (i=0;i<numberColumns_;i++) {
    129129    costGen_[i]=cost[i];
     
    132132  }
    133133  if (columnLower) {
    134     columnLowerGen_ = new float[numberColumns_];
     134    columnLowerGen_ = new double[numberColumns_];
    135135    for (i=0;i<numberColumns_;i++) {
    136136      columnLowerGen_[i]=columnLower[i];
     
    144144  }
    145145  if (columnUpper) {
    146     columnUpperGen_ = new float[numberColumns_];
     146    columnUpperGen_ = new double[numberColumns_];
    147147    for (i=0;i<numberColumns_;i++)
    148148      columnUpperGen_[i]=columnUpper[i];
     
    224224                          const double * lower, const double * upper,
    225225                          int * startColumn, int * row,
    226                           float * element, float * cost,
    227                           float * columnLower, float * columnUpper,
     226                          double * element, double * cost,
     227                          double * columnLower, double * columnUpper,
    228228                          const unsigned char * status,
    229229                          const unsigned char * dynamicStatus,
     
    253253  // and size correctly
    254254  row_ = new int [maximumElements_];
    255   element_ = new float [maximumElements_];
     255  element_ = new double [maximumElements_];
    256256  startColumn_ = new CoinBigIndex [maximumGubColumns_+1];
    257257  // say no columns yet
    258258  numberGubColumns_=0;
    259259  startColumn_[0]=0;
    260   cost_ = new float[maximumGubColumns_];
     260  cost_ = new double[maximumGubColumns_];
    261261  dynamicStatus_ = new unsigned char [maximumGubColumns_];
    262262  memset(dynamicStatus_,0,maximumGubColumns_);
    263263  id_ = new int[maximumGubColumns_];
    264264  if (columnLower)
    265     columnLower_ = new float[maximumGubColumns_];
     265    columnLower_ = new double[maximumGubColumns_];
    266266  else
    267267    columnLower_ = NULL;
    268268  if (columnUpper)
    269     columnUpper_ = new float[maximumGubColumns_];
     269    columnUpper_ = new double[maximumGubColumns_];
    270270  else
    271271    columnUpper_=NULL;
  • branches/BSP/trunk/Clp/src/ClpDynamicExampleMatrix.hpp

    r1055 r1072  
    7474                          const double * lower, const double * upper,
    7575                          int * startColumn, int * row,
    76                           float * element, float * cost,
    77                           float * columnLower=NULL, float * columnUpper=NULL,
     76                          double * element, double * cost,
     77                          double * columnLower=NULL, double * columnUpper=NULL,
    7878                          const unsigned char * status=NULL,
    7979                          const unsigned char * dynamicStatus=NULL,
     
    101101  { return rowGen_;}
    102102  /// elements
    103   inline float * elementGen() const
     103  inline double * elementGen() const
    104104  { return elementGen_;}
    105105  /// costs
    106   inline float * costGen() const
     106  inline double * costGen() const
    107107  { return costGen_;}
    108108  /// full starts
     
    113113  { return idGen_;}
    114114  /// Optional lower bounds on columns
    115   inline float * columnLowerGen() const
     115  inline double * columnLowerGen() const
    116116  { return columnLowerGen_;}
    117117  /// Optional upper bounds on columns
    118   inline float * columnUpperGen() const
     118  inline double * columnUpperGen() const
    119119  { return columnUpperGen_;}
    120120  /// size
     
    153153  int * rowGen_;
    154154  /// elements
    155   float * elementGen_;
     155  double * elementGen_;
    156156  /// costs
    157   float * costGen_;
     157  double * costGen_;
    158158  /// start of each set
    159159  int * fullStartGen_;
     
    165165  int * idGen_;
    166166  /// Optional lower bounds on columns
    167   float * columnLowerGen_;
     167  double * columnLowerGen_;
    168168  /// Optional upper bounds on columns
    169   float * columnUpperGen_;
     169  double * columnUpperGen_;
    170170   //@}
    171171};
  • branches/BSP/trunk/Clp/src/ClpDynamicMatrix.cpp

    r1034 r1072  
    177177  CoinBigIndex numberElements = startColumn_[numberGubColumns_];
    178178  row_ = ClpCopyOfArray(row,numberElements);
    179   element_ = new float[numberElements];
     179  element_ = new double[numberElements];
    180180  CoinBigIndex i;
    181181  for (i=0;i<numberElements;i++)
    182182    element_[i]=element[i];
    183   cost_ = new float[numberGubColumns_];
     183  cost_ = new double[numberGubColumns_];
    184184  for (i=0;i<numberGubColumns_;i++) {
    185185    cost_[i]=cost[i];
     
    188188  }
    189189  if (columnLower) {
    190     columnLower_ = new float[numberGubColumns_];
     190    columnLower_ = new double[numberGubColumns_];
    191191    for (i=0;i<numberGubColumns_;i++)
    192192      columnLower_[i]=columnLower[i];
     
    195195  }
    196196  if (columnUpper) {
    197     columnUpper_ = new float[numberGubColumns_];
     197    columnUpper_ = new double[numberGubColumns_];
    198198    for (i=0;i<numberGubColumns_;i++)
    199199      columnUpper_[i]=columnUpper[i];
     
    201201    columnUpper_=NULL;
    202202  }
    203   lowerSet_ = new float[numberSets_];
     203  lowerSet_ = new double[numberSets_];
    204204  for (i=0;i<numberSets_;i++) {
    205205    if (lower[i]>-1.0e20)
     
    208208      lowerSet_[i] = -1.0e30;
    209209  }
    210   upperSet_ = new float[numberSets_];
     210  upperSet_ = new double[numberSets_];
    211211  for (i=0;i<numberSets_;i++) {
    212212    if (upper[i]<1.0e20)
     
    22182218// Adds in a column to gub structure (called from descendant)
    22192219int
    2220 ClpDynamicMatrix::addColumn(int numberEntries,const int * row, const float * element,
    2221                             float cost, float lower, float upper,int iSet,
     2220ClpDynamicMatrix::addColumn(int numberEntries,const int * row, const double * element,
     2221                            double cost, double lower, double upper,int iSet,
    22222222                            DynamicStatus status)
    22232223{
     
    22272227    if (startColumn_[j+1]-startColumn_[j]==numberEntries) {
    22282228      const int * row2 = row_+startColumn_[j];
    2229       const float * element2 = element_ + startColumn_[j];
     2229      const double * element2 = element_ + startColumn_[j];
    22302230      bool same=true;
    22312231      for (int k=0;k<numberEntries;k++) {
  • branches/BSP/trunk/Clp/src/ClpDynamicMatrix.hpp

    r1055 r1072  
    9393  void initialProblem();
    9494  /** Adds in a column to gub structure (called from descendant) and returns sequence */
    95   int addColumn(int numberEntries,const int * row, const float * element,
    96                  float cost, float lower, float upper, int iSet,
     95  int addColumn(int numberEntries,const int * row, const double * element,
     96                 double cost, double lower, double upper, int iSet,
    9797                 DynamicStatus status);
    9898  /** If addColumn forces compression then this allows descendant to know what to do.
     
    188188  { return row_;}
    189189  /// elements
    190   inline float * element() const
     190  inline double * element() const
    191191  { return element_;}
    192192  /// costs
    193   inline float * cost() const
     193  inline double * cost() const
    194194  { return cost_;}
    195195  /// ids of active columns (just index here)
     
    197197  { return id_;}
    198198  /// Optional lower bounds on columns
    199   inline float * columnLower() const
     199  inline double * columnLower() const
    200200  { return columnLower_;}
    201201  /// Optional upper bounds on columns
    202   inline float * columnUpper() const
     202  inline double * columnUpper() const
    203203  { return columnUpper_;}
    204204  /// Lower bounds on sets
    205   inline float * lowerSet() const
     205  inline double * lowerSet() const
    206206  { return lowerSet_;}
    207207  /// Upper bounds on sets
    208   inline float * upperSet() const
     208  inline double * upperSet() const
    209209  { return upperSet_;}
    210210  /// size
     
    272272  double objectiveOffset_;
    273273  /// Lower bounds on sets
    274   float * lowerSet_;
     274  double * lowerSet_;
    275275  /// Upper bounds on sets
    276   float * upperSet_;
     276  double * upperSet_;
    277277  /// Status of slack on set
    278278  unsigned char * status_;
     
    318318  int * row_;
    319319  /// elements
    320   float * element_;
     320  double * element_;
    321321  /// costs
    322   float * cost_;
     322  double * cost_;
    323323  /// ids of active columns (just index here)
    324324  int * id_;
     
    326326  unsigned char * dynamicStatus_;
    327327  /// Optional lower bounds on columns
    328   float * columnLower_;
     328  double * columnLower_;
    329329  /// Optional upper bounds on columns
    330   float * columnUpper_;
     330  double * columnUpper_;
    331331   //@}
    332332};
Note: See TracChangeset for help on using the changeset viewer.