COIN-OR::LEMON - Graph Library

Changeset 1950:a1a6f5b788bd in lemon-0.x for lemon


Ignore:
Timestamp:
02/03/06 13:20:10 (14 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2525
Message:

lp_cplex.cc: bugfix in _setColName, _getColName implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/lp_cplex.cc

    r1895 r1950  
    8484  void LpCplex::_getColName(int col, std::string &name)
    8585  {
    86     ///\bug Unimplemented
     86    ///\bug Untested
     87    int storespace;
     88    CPXgetcolname(env, lp, 0, 0, 0, &storespace, col, col);
     89
     90    storespace *= -1;
     91    char buf[storespace];
     92    char *names[1];
     93    int dontcare;
     94    ///\bug return code unchecked for error
     95    CPXgetcolname(env, lp, names, buf, storespace, &dontcare, col, col);
     96    name = names[0];
    8797  }
    8898 
     
    90100  {
    91101    ///\bug Untested
    92     CPXchgcolname(env, lp, 1, &col, const_cast<char*>(name.c_str()));
     102    char *names[1];
     103    names[0] = const_cast<char*>(name.c_str());
     104    ///\bug return code unchecked for error
     105    CPXchgcolname(env, lp, 1, &col, names);   
    93106  }
    94107 
Note: See TracChangeset for help on using the changeset viewer.