Bonmin 1.8.9
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Bonmin::SolReader Class Reference

A class for reading a .col or .row file containing name for variables and constraints (usually ampl generated file). More...

#include <BonSolReader.hpp>

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.
 

Detailed Description

A class for reading a .col or .row file containing name for variables and constraints (usually ampl generated file).

Definition at line 24 of file BonSolReader.hpp.

Constructor & Destructor Documentation

◆ SolReader() [1/2]

Bonmin::SolReader::SolReader ( const char * fileName,
const char * suffix )

Constructor with a file name given by a const char *.

◆ SolReader() [2/2]

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)

Member Function Documentation

◆ readFile() [1/2]

bool Bonmin::SolReader::readFile ( )

Reads the .sol file.

◆ readFile() [2/2]

bool Bonmin::SolReader::readFile ( const std::string & file)
inline

Reads the .sol file fileName.

Definition at line 34 of file BonSolReader.hpp.

◆ copySol()

void Bonmin::SolReader::copySol ( double * x)

Copy the names to Names.

◆ x()

const double * Bonmin::SolReader::x ( )
inline

Definition at line 43 of file BonSolReader.hpp.

◆ set_n_cols()

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.


The documentation for this class was generated from the following file: