pelib
2.0.0
|
#include <AmplInputMatrix.hpp>
Public Member Functions | |
AmplInputMatrix (bool strict=true) | |
virtual AmplInputMatrix * | clone () const |
virtual std::string | getDetailedPattern () |
virtual std::string | getGlobalPattern () |
virtual AlgebraData * | parse (std::istream &in) |
virtual void | dump (std::ostream &o, const AlgebraData *data) const |
Protected Attributes | |
bool | strict |
Parser and output class for pelib::Matrix in AMPL input data format
Definition at line 34 of file AmplInputMatrix.hpp.
pelib::AmplInputMatrix< Col, Row, Value >::AmplInputMatrix | ( | bool | strict = true | ) | [inline] |
Constructor
strict | If parsing Floating-point values and any value to parse is an integer written with no decimal suffix (e.g. 52.0), then if strict is 1, then the complete parsin operation fails |
Definition at line 43 of file AmplInputMatrix.hpp.
virtual AmplInputMatrix* pelib::AmplInputMatrix< Col, Row, Value >::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a coppy of this class instance
Implements pelib::AmplInputDataOutput.
Definition at line 52 of file AmplInputMatrix.hpp.
virtual void pelib::AmplInputMatrix< Col, Row, Value >::dump | ( | std::ostream & | o, |
const AlgebraData * | data | ||
) | const [inline, virtual] |
Writes the content in class instance of pelib::Matrix into text output stream in AMPL input data format
o | Output stream where the matrix is written to in AMPL input data format |
data | Instance of pelib::Matrix to be written in output stream |
Implements pelib::AlgebraDataOutput.
Definition at line 179 of file AmplInputMatrix.hpp.
virtual std::string pelib::AmplInputMatrix< Col, Row, Value >::getDetailedPattern | ( | ) | [inline, virtual] |
Returns a boost::regex pattern that can match a matrix in AMPL output format and capture each of its elements
Implements pelib::AlgebraDataParser.
Definition at line 60 of file AmplInputMatrix.hpp.
virtual std::string pelib::AmplInputMatrix< Col, Row, Value >::getGlobalPattern | ( | ) | [inline, virtual] |
Returns a boost::regex pattern that can match a matrix in AMPL output format
Implements pelib::AlgebraDataParser.
Definition at line 68 of file AmplInputMatrix.hpp.
virtual AlgebraData* pelib::AmplInputMatrix< Col, Row, Value >::parse | ( | std::istream & | in | ) | [inline, virtual] |
Parses in content of input stream in AMPL Input format into an instance of pelib::Matrix
in | Text input stream in AMPL input data format to parse into a matrix |
Implements pelib::AlgebraDataParser.
Definition at line 79 of file AmplInputMatrix.hpp.
bool pelib::AmplInputMatrix< Col, Row, Value >::strict [protected] |
If true and parsing floating point matrix content, fails if any elment is an integer written without any trailing decimal part (e.g. 52.0)
Definition at line 212 of file AmplInputMatrix.hpp.