Changeset 873 for branches


Ignore:
Timestamp:
Oct 18, 2006 10:11:25 AM (13 years ago)
Author:
forrest
Message:

for when one section has names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Clp/src/ClpModel.cpp

    r862 r873  
    32473247  if (lengthNames()) {
    32483248    rowNames = new char * [numberRows_+1];
    3249     for (int iRow=0;iRow<numberRows_;iRow++) {
     3249    int numberNames = rowNames_.size();
     3250    numberNames = CoinMin(numberRows_,numberNames);
     3251    int iRow;
     3252    for (iRow=0;iRow<numberNames;iRow++) {
    32503253      rowNames[iRow] =
    32513254        strdup(rowName(iRow).c_str());
     
    32623265#endif
    32633266    }
     3267    char name[9];
     3268    for ( ;iRow<numberRows_;iRow++) {
     3269      sprintf(name,"R%7.7d",iRow);
     3270      rowNames[iRow]=strdup(name);
     3271    }
    32643272    rowNames[numberRows_] = strdup("OBJROW");
    32653273  }
     
    32733281  if (lengthNames()) {
    32743282    columnNames = new char * [numberColumns_];
    3275     for (int iColumn=0;iColumn<numberColumns_;iColumn++) {
     3283    int numberNames = columnNames_.size();
     3284    numberNames = CoinMin(numberColumns_,numberNames);
     3285    int iColumn;
     3286    for (iColumn=0;iColumn<numberNames;iColumn++) {
    32763287      columnNames[iColumn] =
    32773288        strdup(columnName(iColumn).c_str());
     
    32873298      xx[n]='\0';
    32883299#endif
     3300    }
     3301    char name[9];
     3302    for ( ;iColumn<numberColumns_;iColumn++) {
     3303      sprintf(name,"C%7.7d",iColumn);
     3304      columnNames[iColumn]=strdup(name);
    32893305    }
    32903306  }
Note: See TracChangeset for help on using the changeset viewer.