Frobby  0.9.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Matrix Class Reference

#include <Matrix.h>

Public Member Functions

 Matrix (size_t rowCount=0, size_t colCount=0)
 
size_t getRowCount () const
 
size_t getColCount () const
 
void resize (size_t rowCount, size_t colCount)
 Set the number of rows and columns. More...
 
const mpq_class & operator() (size_t row, size_t col) const
 
mpq_class & operator() (size_t row, size_t col)
 
void swap (Matrix &mat)
 

Private Member Functions

size_t toIndex (size_t row, size_t col) const
 

Private Attributes

size_t _rowCount
 
size_t _colCount
 
vector< mpq_class > _entries
 

Detailed Description

Definition at line 26 of file Matrix.h.

Constructor & Destructor Documentation

Matrix::Matrix ( size_t  rowCount = 0,
size_t  colCount = 0 
)

Definition at line 57 of file Matrix.cpp.

Member Function Documentation

size_t Matrix::getColCount ( ) const
inline

Definition at line 31 of file Matrix.h.

size_t Matrix::getRowCount ( ) const
inline

Definition at line 30 of file Matrix.h.

const mpq_class& Matrix::operator() ( size_t  row,
size_t  col 
) const
inline

Definition at line 39 of file Matrix.h.

mpq_class& Matrix::operator() ( size_t  row,
size_t  col 
)
inline

Definition at line 41 of file Matrix.h.

void Matrix::resize ( size_t  rowCount,
size_t  colCount 
)

Set the number of rows and columns.

Preserves the value of entries that are still present. New entries are initialized to zero.

Definition at line 61 of file Matrix.cpp.

void Matrix::swap ( Matrix mat)

Definition at line 74 of file Matrix.cpp.

size_t Matrix::toIndex ( size_t  row,
size_t  col 
) const
inlineprivate

Definition at line 47 of file Matrix.h.

Member Data Documentation

size_t Matrix::_colCount
private

Definition at line 57 of file Matrix.h.

vector<mpq_class> Matrix::_entries
private

Definition at line 58 of file Matrix.h.

size_t Matrix::_rowCount
private

Definition at line 56 of file Matrix.h.


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