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

#include <Matrix.hpp>

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

List of all members.

Public Member Functions

 Matrix (const std::string name, const MatrixType values)
 Matrix (const Matrix< Col, Row, Value > *matrix)
virtual Matrixclone () const
virtual const MatrixType & getValues () const
virtual const Value & find (Col col, Row row) const
virtual size_t getColSize () const
virtual size_t getRowSize () const
virtual Matrix< Row, Col, Value > transpose () const
void merge (const AlgebraData *ptr)

Protected Attributes

MatrixType values

Detailed Description

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

Simple Matrix implementation for linear algebra

Definition at line 39 of file Matrix.hpp.


Constructor & Destructor Documentation

template<class Col, class Row, class Value>
pelib::Matrix< Col, Row, Value >::Matrix ( const std::string  name,
const MatrixType  values 
) [inline]

Constructor: builds a matrix with the name and values given as parameters

Definition at line 48 of file Matrix.hpp.

template<class Col, class Row, class Value>
pelib::Matrix< Col, Row, Value >::Matrix ( const Matrix< Col, Row, Value > *  matrix) [inline]

Copy constructor

Definition at line 54 of file Matrix.hpp.


Member Function Documentation

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

Returns a pointer to a copy this matrix

Implements pelib::AlgebraData.

Definition at line 62 of file Matrix.hpp.

template<class Col, class Row, class Value>
virtual const Value& pelib::Matrix< Col, Row, Value >::find ( Col  col,
Row  row 
) const [inline, virtual]

Returns a value identified by its row and column

Definition at line 78 of file Matrix.hpp.

template<class Col, class Row, class Value>
virtual size_t pelib::Matrix< Col, Row, Value >::getColSize ( ) const [inline, virtual]

Returns the number of rows in the matrix

Definition at line 86 of file Matrix.hpp.

template<class Col, class Row, class Value>
virtual size_t pelib::Matrix< Col, Row, Value >::getRowSize ( ) const [inline, virtual]

Returns the number of columns in the matrix

Definition at line 94 of file Matrix.hpp.

template<class Col, class Row, class Value>
virtual const MatrixType& pelib::Matrix< Col, Row, Value >::getValues ( ) const [inline, virtual]

Returns all values in the matrix

Definition at line 70 of file Matrix.hpp.

template<class Col, class Row, class Value>
void pelib::Matrix< Col, Row, Value >::merge ( const AlgebraData ) [inline, virtual]

Merge data in this instance and instance given as argument, or replace it if merging is not possible

Implements pelib::AlgebraData.

Definition at line 118 of file Matrix.hpp.

template<class Col, class Row, class Value>
virtual Matrix<Row, Col, Value> pelib::Matrix< Col, Row, Value >::transpose ( ) const [inline, virtual]

Returns a new matrix instance that is the transposed of this matrix

Definition at line 102 of file Matrix.hpp.


Member Data Documentation

template<class Col, class Row, class Value>
MatrixType pelib::Matrix< Col, Row, Value >::values [protected]

Internal container of the matrix values

Definition at line 163 of file Matrix.hpp.


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