pelib  2.0.0
pelib::AmplInputMatrix< Col, Row, Value > Class Template Reference

#include <AmplInputMatrix.hpp>

Inheritance diagram for pelib::AmplInputMatrix< Col, Row, Value >:
[legend]

List of all members.

Public Member Functions

 AmplInputMatrix (bool strict=true)
virtual AmplInputMatrixclone () const
virtual std::string getDetailedPattern ()
virtual std::string getGlobalPattern ()
virtual AlgebraDataparse (std::istream &in)
virtual void dump (std::ostream &o, const AlgebraData *data) const

Protected Attributes

bool strict

Detailed Description

template<class Col, class Row, class Value>
class pelib::AmplInputMatrix< Col, Row, Value >

Parser and output class for pelib::Matrix in AMPL input data format

Definition at line 34 of file AmplInputMatrix.hpp.


Constructor & Destructor Documentation

template<class Col , class Row , class Value >
pelib::AmplInputMatrix< Col, Row, Value >::AmplInputMatrix ( bool  strict = true) [inline]

Constructor

Parameters:
strictIf 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.


Member Function Documentation

template<class Col , class Row , class Value >
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.

template<class Col , class Row , class Value >
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

Parameters:
oOutput stream where the matrix is written to in AMPL input data format
dataInstance of pelib::Matrix to be written in output stream

Implements pelib::AlgebraDataOutput.

Definition at line 179 of file AmplInputMatrix.hpp.

template<class Col , class Row , class Value >
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.

template<class Col , class Row , class Value >
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.

template<class Col , class Row , class Value >
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

Parameters:
inText input stream in AMPL input data format to parse into a matrix
Returns:
An instance of pelib::Matrix with the content parsed.

Implements pelib::AlgebraDataParser.

Definition at line 79 of file AmplInputMatrix.hpp.


Member Data Documentation

template<class Col , class Row , class Value >
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.


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