#include <BonSolReader.hpp>
Collaboration diagram for Bonmin::SolReader:
Public Member Functions | |
SolReader (const char *fileName, const char *suffix) | |
Constructor with a file name given by a const char *. | |
SolReader (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 () |
Reads the .sol file. | |
bool | readFile (const std::string &file) |
Reads the .sol file fileName. | |
void | copySol (double *x) |
Copy the names to Names. | |
const double * | x () |
void | set_n_cols (int n) |
Set the number of variables in the problem. | |
Private Attributes | |
std::string | file_ |
Name of the file to read. | |
std::string | suffix_ |
Suffix of the file (".col", ".row"). | |
vector< double > | x_ |
Sol values. |
Definition at line 24 of file BonSolReader.hpp.
Bonmin::SolReader::SolReader | ( | const char * | fileName, | |
const char * | suffix | |||
) |
Constructor with a file name given by a const char *.
Definition at line 15 of file BonSolReader.cpp.
Bonmin::SolReader::SolReader | ( | const std::string & | fileName = "" , |
|
const std::string & | suffix = ".col" | |||
) |
Constructor with a file name given by a string and also default (empty string).
Definition at line 24 of file BonSolReader.cpp.
bool Bonmin::SolReader::readFile | ( | ) |
Reads the .sol file.
Definition at line 29 of file BonSolReader.cpp.
References file_, suffix_, and x_.
Referenced by readFile().
bool Bonmin::SolReader::readFile | ( | const std::string & | file | ) | [inline] |
Reads the .sol file fileName.
Definition at line 34 of file BonSolReader.hpp.
References file_, and readFile().
void Bonmin::SolReader::copySol | ( | double * | x | ) |
const double* Bonmin::SolReader::x | ( | ) | [inline] |
void Bonmin::SolReader::set_n_cols | ( | int | n | ) | [inline] |
Set the number of variables in the problem.
Definition at line 48 of file BonSolReader.hpp.
References x_.
std::string Bonmin::SolReader::file_ [private] |
Name of the file to read.
Definition at line 53 of file BonSolReader.hpp.
Referenced by readFile(), and SolReader().
std::string Bonmin::SolReader::suffix_ [private] |
Suffix of the file (".col", ".row").
Definition at line 56 of file BonSolReader.hpp.
Referenced by readFile(), and SolReader().
vector<double> Bonmin::SolReader::x_ [private] |
Sol values.
Definition at line 59 of file BonSolReader.hpp.
Referenced by copySol(), readFile(), set_n_cols(), and x().