Anasazi Version of the Day
Public Member Functions
TSQR::Matrix< Ordinal, Scalar > Class Template Reference

A column-oriented dense matrix. More...

#include <Tsqr_Matrix.hpp>

List of all members.

Public Member Functions

template<class MatrixViewType >
void copy (MatrixViewType &B)
Scalar & operator() (const Ordinal i, const Ordinal j)
Scalar & operator[] (const Ordinal i)
 1-D std::vector - style access
void reshape (const Ordinal num_rows, const Ordinal num_cols)

Detailed Description

template<class Ordinal, class Scalar>
class TSQR::Matrix< Ordinal, Scalar >

A column-oriented dense matrix.

A column-oriented dense matrix, with indices of type Ordinal and elements of type Scalar.

Note:
This class resembles Teuchos::SerialDenseMatrix. It exists because I didn't want TSQR to depend on Teuchos. This is not because I don't like Teuchos, but because I had/have potential TSQR users who might not want to depend on Teuchos.

Definition at line 56 of file Tsqr_Matrix.hpp.


Member Function Documentation

template<class Ordinal, class Scalar>
template<class MatrixViewType >
void TSQR::Matrix< Ordinal, Scalar >::copy ( MatrixViewType &  B) [inline]

*this gets a deep copy of B.

Note:
Assumes *this and B have the same dimensions (but not necessarily the same strides).

Definition at line 201 of file Tsqr_Matrix.hpp.

template<class Ordinal, class Scalar>
Scalar& TSQR::Matrix< Ordinal, Scalar >::operator() ( const Ordinal  i,
const Ordinal  j 
) [inline]

2-D Fortran array - style access (column-major order, though indexing is zero-based (C style) instead of one-based (Fortran style))

Definition at line 225 of file Tsqr_Matrix.hpp.

template<class Ordinal, class Scalar>
Scalar& TSQR::Matrix< Ordinal, Scalar >::operator[] ( const Ordinal  i) [inline]

1-D std::vector - style access

Definition at line 234 of file Tsqr_Matrix.hpp.

template<class Ordinal, class Scalar>
void TSQR::Matrix< Ordinal, Scalar >::reshape ( const Ordinal  num_rows,
const Ordinal  num_cols 
) [inline]

Change the dimensions of the matrix. Reallocate if necessary. Existing data in the matrix is invalidated.

Parameters:
num_rows[in] New number of rows in the matrix
num_cols[in] New number of columns in the matrix

Definition at line 299 of file Tsqr_Matrix.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends