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

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

#include <BonColReader.hpp>

Public Member Functions

 NamesReader (const char *fileName, const char *suffix)
 Constructor with a file name given by a const char *.
 
 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 ()
 Reads the .col file.
 
bool readFile (const std::string &file)
 Reads the .col file fileName.
 
void copyNames (OsiSolverInterface::OsiNameVec &Names)
 Copy the names to Names.
 
const std::string & name (int i)
 Access Names of indexed by i.
 
int index (const char *str)
 Access index of variable str.
 

Detailed Description

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

Definition at line 25 of file BonColReader.hpp.

Constructor & Destructor Documentation

◆ NamesReader() [1/2]

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

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

◆ NamesReader() [2/2]

Bonmin::NamesReader::NamesReader ( 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::NamesReader::readFile ( )

Reads the .col file.

◆ readFile() [2/2]

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

Reads the .col file fileName.

Definition at line 35 of file BonColReader.hpp.

◆ copyNames()

void Bonmin::NamesReader::copyNames ( OsiSolverInterface::OsiNameVec & Names)

Copy the names to Names.

◆ name()

const std::string & Bonmin::NamesReader::name ( int i)
inline

Access Names of indexed by i.

Definition at line 45 of file BonColReader.hpp.

◆ index()

int Bonmin::NamesReader::index ( const char * str)
inline

Access index of variable str.

Definition at line 50 of file BonColReader.hpp.


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