Changeset 1009 for branches


Ignore:
Timestamp:
May 18, 2007 9:43:41 AM (12 years ago)
Author:
forrest
Message:

for readLp names

File:
1 edited

Legend:

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

    r998 r1009  
    60676067  // set problem name
    60686068  setStrParam(ClpProbName, m.getProblemName());
    6069  
    60706069  // no errors
    60716070  loadProblem(*m.getMatrixByRow(), m.getColLower(), m.getColUpper(),
     
    60796078  }
    60806079  createStatus();
     6080  unsigned int maxLength=0;
     6081  int iRow;
     6082  rowNames_ = std::vector<std::string> ();
     6083  columnNames_ = std::vector<std::string> ();
     6084  rowNames_.reserve(numberRows_);
     6085  for (iRow=0;iRow<numberRows_;iRow++) {
     6086    const char * name = m.rowName(iRow);
     6087    if (name) {
     6088      maxLength = CoinMax(maxLength,(unsigned int) strlen(name));
     6089      rowNames_.push_back(name);
     6090    } else {
     6091      rowNames_.push_back("");
     6092    }
     6093  }
     6094 
     6095  int iColumn;
     6096  columnNames_.reserve(numberColumns_);
     6097  for (iColumn=0;iColumn<numberColumns_;iColumn++) {
     6098    const char * name = m.columnName(iColumn);
     6099    if (name) {
     6100      maxLength = CoinMax(maxLength,(unsigned int) strlen(name));
     6101      columnNames_.push_back(name);
     6102    } else {
     6103      columnNames_.push_back("");
     6104    }
     6105  }
     6106  lengthNames_=(int) maxLength;
     6107 
    60816108  return 0;
    60826109}
Note: See TracChangeset for help on using the changeset viewer.