/** Parses an LP file segment for bounds. \param file istream to read data from. \return last line read. */ std::string* LPModel::ReadBounds(std::istream &file) { return ReadVars(file, Bounds, [](const std::string& line, std::vector<Bound>& list) { if (line.length() > 0 && line[0] != '\r' && line[0] != '\n') { auto b = Bound::Parse(line); if (b != nullptr) { list.push_back(*b); } } }); }
void ReadConf(TestSuite &suite, const char *varsPath, const char *testsPath) { ReadVars(varsPath); ReadTests(testsPath, suite); }
/** Parses an LP file segment for SOS variables. \param file istream to read data from. \return last line read. */ std::string* LPModel::ReadSosVars(std::istream &file) { return ReadVars(file, SosVars, [](const std::string& line, std::vector<std::string>& list) { ::split(line, ' ', list, [](const std::string& s) { return s.length() > 0 && s[0] != '\r' && s[0] != '\n'; }); }); }