31 NamesReader(
const std::string & fileName=
"",
const std::string& suffix=
".col");
42 void copyNames(OsiSolverInterface::OsiNameVec& Names);
45 const std::string&
name(
int i){
63 bool operator()(
const char* s1,
const char* s2)
const
65 return strcmp(s1, s2) < 0;
70 typedef std::map<const char *, int, ltstr> namesHash;
74 std::vector<std::string> names_;
A class for reading a .col or .row file containing name for variables and constraints (usually ampl g...
NamesReader(const std::string &fileName="", const std::string &suffix=".col")
Constructor with a file name given by a string and also default (empty string)
int index(const char *str)
Access index of variable str.
const std::string & name(int i)
Access Names of indexed by i.
void copyNames(OsiSolverInterface::OsiNameVec &Names)
Copy the names to Names.
bool readFile(const std::string &file)
Reads the .col file fileName.
bool readFile()
Reads the .col file.
NamesReader(const char *fileName, const char *suffix)
Constructor with a file name given by a const char *.
(C) Copyright International Business Machines Corporation 2007