pelib
2.0.0
|
#include <AmplOutputVector.hpp>
Public Member Functions | |
AmplOutputVector (bool strict=true) | |
virtual AmplOutputVector * | 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 in AMPL output format for pelib algebraic Vector data structure
Definition at line 35 of file AmplOutputVector.hpp.
pelib::AmplOutputVector< Key, Value >::AmplOutputVector | ( | bool | strict = true | ) | [inline] |
Constructor
strict | If true and parsing a floating-point values-collection, fails if any element is an integer but succeeds if integers are written with a trailing decimal 0 (e.g. 52.0) |
Definition at line 44 of file AmplOutputVector.hpp.
virtual AmplOutputVector* pelib::AmplOutputVector< Key, Value >::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a opy of this class instance
Implements pelib::AmplOutputDataOutput.
Definition at line 52 of file AmplOutputVector.hpp.
virtual void pelib::AmplOutputVector< Key, Value >::dump | ( | std::ostream & | o, |
const AlgebraData * | data | ||
) | const [inline, virtual] |
Writes an instance of pelib::Vector into an output stream in AMPL output format
o | Output stream |
data | Instance of pelib::Vector to be written |
Implements pelib::AlgebraDataOutput.
Definition at line 149 of file AmplOutputVector.hpp.
virtual std::string pelib::AmplOutputVector< Key, Value >::getDetailedPattern | ( | ) | [inline, virtual] |
Uses a boost::regex regular expression to match a vector written in AMPL output format and extract its name and value
Implements pelib::AlgebraDataParser.
Definition at line 60 of file AmplOutputVector.hpp.
virtual std::string pelib::AmplOutputVector< Key, Value >::getGlobalPattern | ( | ) | [inline, virtual] |
Uses a boost::regex regular expression to match a vector written in AMPL output format
Implements pelib::AlgebraDataParser.
Definition at line 68 of file AmplOutputVector.hpp.
virtual AlgebraData* pelib::AmplOutputVector< Key, Value >::parse | ( | std::istream & | in | ) | [inline, virtual] |
Reads input stream in AMPL output format and builds an instance of pelib::Vector containing all values
in | Input stream to read AMPL output text from |
Implements pelib::AlgebraDataParser.
Definition at line 79 of file AmplOutputVector.hpp.
bool pelib::AmplOutputVector< Key, Value >::strict [protected] |
Defines if parsing operations are performed in strict mode (see constructor)
Definition at line 167 of file AmplOutputVector.hpp.