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

#include <AmplOutputMatrix.hpp>

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

List of all members.

Public Member Functions

 AmplOutputMatrix (bool strict=true)
virtual AmplOutputMatrixclone () 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::AmplOutputMatrix< Col, Row, Value >

Parser and output class of an instance of pelib::Matrix in AMPL output format

Definition at line 43 of file AmplOutputMatrix.hpp.


Constructor & Destructor Documentation

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

Constructor

Parameters:
strictif 1 and parsing a matrix of floating-points values (except indexes), fails if any value parsed is an integer. An integer written as a float (e.g. 52.0) doesn't makes the parser to fail

Definition at line 52 of file AmplOutputMatrix.hpp.


Member Function Documentation

template<class Col , class Row , class Value >
virtual AmplOutputMatrix* pelib::AmplOutputMatrix< Col, Row, Value >::clone ( ) const [inline, virtual]

Returns a pointer to a copy of this instance

Implements pelib::AmplOutputDataOutput.

Definition at line 60 of file AmplOutputMatrix.hpp.

template<class Col , class Row , class Value >
virtual void pelib::AmplOutputMatrix< Col, Row, Value >::dump ( std::ostream &  o,
const AlgebraData data 
) const [inline, virtual]

Writes the content of an instance of pelib::Matrix to a stream output in AMPL output format

Implements pelib::AlgebraDataOutput.

Definition at line 177 of file AmplOutputMatrix.hpp.

template<class Col , class Row , class Value >
virtual std::string pelib::AmplOutputMatrix< Col, Row, Value >::getDetailedPattern ( ) [inline, virtual]

Returns a string boost::regex regular expression able to match a Matrix in AMPL output format and extract its name, indexes and values to an instance of pelib::Matrix

Implements pelib::AlgebraDataParser.

Definition at line 68 of file AmplOutputMatrix.hpp.

template<class Col , class Row , class Value >
virtual std::string pelib::AmplOutputMatrix< Col, Row, Value >::getGlobalPattern ( ) [inline, virtual]

Returns a string boost::regex regular expression able to match a Matrix in AMPL output format

Implements pelib::AlgebraDataParser.

Definition at line 76 of file AmplOutputMatrix.hpp.

template<class Col , class Row , class Value >
virtual AlgebraData* pelib::AmplOutputMatrix< Col, Row, Value >::parse ( std::istream &  in) [inline, virtual]

Reads the content of an input stream in AMPL output text format and builds an instance of pelib::Matrix from all values read

Implements pelib::AlgebraDataParser.

Definition at line 84 of file AmplOutputMatrix.hpp.


Member Data Documentation

template<class Col , class Row , class Value >
bool pelib::AmplOutputMatrix< Col, Row, Value >::strict [protected]

Defines if parsing operations are performed in strict mode

Definition at line 208 of file AmplOutputMatrix.hpp.


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