Scythe-1.0.3
Public Member Functions | Protected Member Functions | Protected Attributes
scythe::Matrix_base< ORDER, STYLE > Class Template Reference

Matrix superclass. More...

#include <scythestat/matrix.h>

Inheritance diagram for scythe::Matrix_base< ORDER, STYLE >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

uint size () const
 Returns the total number of elements in the Matrix.
uint rows () const
 Returns the number of rows in the Matrix.
uint cols () const
 Returns the number of columns in the Matrix.
matrix_order order () const
 Check matrix ordering.
matrix_style style () const
 Check matrix style.
matrix_order storeorder () const
 Returns the storage order of the underlying DataBlock.
uint rowstride () const
 Returns the in-memory distance between elements in successive rows of the matrix.
uint colstride () const
 Returns the in-memory distance between elements in successive columns of the matrix.
uint max_size () const
 Returns the maximum possible matrix size.
bool isScalar () const
 Returns true if this Matrix is 1x1.
bool isRowVector () const
 Returns true if this Matrix is 1xm.
bool isColVector () const
 Returns true if this Matrix is nx1.
bool isVector () const
 Returns true if this Matrix is nx1 or 1xn.
bool isSquare () const
 Returns true if this Matrix is nxn.
bool isNull () const
 Returns true if this Matrix has 0 elements.
bool empty () const
 Returns true if this Matrix has 0 elements.
bool inRange (uint i) const
 Check if an index is in bounds.
bool inRange (uint i, uint j) const
 Check if an index is in bounds.

Protected Member Functions

 Matrix_base (uint rows, uint cols)
 Matrix_base (const Matrix_base &m)
template<matrix_order O, matrix_style S>
 Matrix_base (const Matrix_base< O, S > &m)
template<matrix_order O, matrix_style S>
 Matrix_base (const Matrix_base< O, S > &m, uint x1, uint y1, uint x2, uint y2)
Matrix_baseoperator= (const Matrix_base &m)
template<matrix_order O, matrix_style S>
void mimic (const Matrix_base< O, S > &m)
void resize (uint rows, uint cols)
uint index (uint i) const
uint index (uint row, uint col) const

Protected Attributes

uint rows_
uint cols_

Detailed Description

template<matrix_order ORDER = Col, matrix_style STYLE = Concrete>
class scythe::Matrix_base< ORDER, STYLE >

Matrix superclass.

The Matrix_base class handles Matrix functionality that doesn't need to be templatized with respect to data type. This helps reduce code bloat by reducing replication of code for member functions that don't rely on templating. Furthermore, it hides all of the implementation details of indexing. The constructors of this class are protected and end-users should always work with full-fledged Matrix objects.

The public functions in this class generally provide Matrix metadata like information on dimensionality and size.


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