Go to the documentation of this file.
10 #ifndef NameReader_HPP
11 #define NameReader_HPP
31 NamesReader(
const std::string & fileName=
"",
const std::string& suffix=
".col");
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_;
(C) Copyright International Business Machines Corporation 2007
const std::string & name(int i)
Access Names of indexed by i.
bool readFile()
Reads the .col file.
A class for reading a .col or .row file containing name for variables and constraints (usually ampl g...
void copyNames(OsiSolverInterface::OsiNameVec &Names)
Copy the names to Names.
NamesReader(const std::string &fileName="", const std::string &suffix=".col")
Constructor with a file name given by a string and also default (empty string)
bool readFile(const std::string &file)
Reads the .col file fileName.
int index(const char *str)
Access index of variable str.
std::vector< std::string > OsiNameVec
NamesReader(const char *fileName, const char *suffix)
Constructor with a file name given by a const char *.