colarray::Matrix< T > Class Template Reference

#include <matrix.h>

List of all members.

Public Member Functions

 Matrix ()
 Matrix (int_t m, int_t n)
 Matrix (const Matrix &)
 Matrix (const Matrix< T > &A, int_t i_start, int_t i_end, int_t j_start, int_t j_end)
 ~Matrix ()
const T & operator() (int_t, int_t) const
T & operator() (int_t, int_t)
Matrixoperator= (const Matrix &)
operator= (const T)
Matrixoperator *= (T val)
void fill (const T v)
void fill (const T v1, const T v2)
void inject (const Matrix< T > &A)
const int & get_m () const
const int & get_n () const

Public Attributes

int_t _m
int_t _n
int_t _ld
T * _v

Protected Attributes

T * _data
int * _refCount

Friends

class RowVector< T >
class ColumnVector< T >
std::ostream & operator (std::ostream &, const Matrix< T > &)


Detailed Description

template<typename T>
class colarray::Matrix< T >

Matrix class template
Author:
Roman Geus

Definition at line 34 of file matrix.h.


Constructor & Destructor Documentation

template<typename T>
colarray::Matrix< T >::Matrix (  )  [inline]

Default constructor: Construct an empty matrix

Definition at line 47 of file matrix.h.

template<typename T>
colarray::Matrix< T >::Matrix ( int_t  m,
int_t  n 
) [inline]

Construct an new m-by-n matrix. The matrix entries are not initialised.

Definition at line 133 of file matrix.h.

References colarray::Matrix< T >::_data, colarray::Matrix< T >::_refCount, and colarray::Matrix< T >::_v.

template<typename T>
colarray::Matrix< T >::Matrix ( const Matrix< T > &   )  [inline]

Copy constructor: Construct a matrix sharing the same data.

Definition at line 144 of file matrix.h.

References colarray::Matrix< T >::_refCount.

template<typename T>
colarray::Matrix< T >::Matrix ( const Matrix< T > &  A,
int_t  i_start,
int_t  i_end,
int_t  j_start,
int_t  j_end 
) [inline]

Construct the sub-matrix A[i_start:i_end, j_start:j_end] sharing the data with A.

Definition at line 149 of file matrix.h.

References colarray::Matrix< T >::_data, colarray::Matrix< T >::_ld, colarray::Matrix< T >::_m, colarray::Matrix< T >::_n, colarray::Matrix< T >::_refCount, and colarray::Matrix< T >::_v.

template<typename T>
colarray::Matrix< T >::~Matrix (  )  [inline]

Definition at line 162 of file matrix.h.

References colarray::Matrix< T >::_data, and colarray::Matrix< T >::_refCount.


Member Function Documentation

template<typename T>
void colarray::Matrix< T >::fill ( const T  v1,
const T  v2 
) [inline]

Definition at line 86 of file matrix.h.

template<typename T>
void colarray::Matrix< T >::fill ( const T  v  )  [inline]

Definition at line 81 of file matrix.h.

Referenced by NedelecElement::constructGQ(), NedelecElement::get_AeMe(), and Materials::getParameters().

template<typename T>
const int& colarray::Matrix< T >::get_m (  )  const [inline]

Read property for m

Definition at line 99 of file matrix.h.

Referenced by NedelecElement::get_Ae(), NedelecElement::get_AeMe(), NedelecElement2::get_element_matrix(), NedelecElement1::get_element_matrix(), and NedelecElement::get_Me().

template<typename T>
const int& colarray::Matrix< T >::get_n (  )  const [inline]

Read property for n

Definition at line 102 of file matrix.h.

Referenced by NedelecElement2::get_element_matrix(), NedelecElement1::get_element_matrix(), and NedelecElement::get_Me().

template<typename T>
void colarray::Matrix< T >::inject ( const Matrix< T > &  A  ) 

Definition at line 218 of file matrix.h.

References colarray::Matrix< T >::_m, and colarray::Matrix< T >::_n.

Referenced by linalg::determinant(), linalg::eigenvalueDecomp(), linalg::eigenvalues(), and NedelecElement::surface_integral_curl().

template<typename T>
Matrix< T > & colarray::Matrix< T >::operator *= ( val  )  [inline]

Scale all matrix elements

Definition at line 210 of file matrix.h.

References colarray::Matrix< T >::_m, and colarray::Matrix< T >::_n.

template<typename T>
T & colarray::Matrix< T >::operator() ( int_t  ,
int_t   
) [inline]

Definition at line 176 of file matrix.h.

References colarray::Matrix< T >::_ld, and colarray::Matrix< T >::_v.

template<typename T>
const T & colarray::Matrix< T >::operator() ( int_t  ,
int_t   
) const [inline]

Definition at line 171 of file matrix.h.

References colarray::Matrix< T >::_ld, and colarray::Matrix< T >::_v.

template<typename T>
T colarray::Matrix< T >::operator= ( const   T  )  [inline]

Definition at line 202 of file matrix.h.

References colarray::Matrix< T >::_m, and colarray::Matrix< T >::_n.

template<typename T>
Matrix& colarray::Matrix< T >::operator= ( const Matrix< T > &   )  [inline]


Friends And Related Function Documentation

template<typename T>
friend class ColumnVector< T > [friend]

Definition at line 96 of file matrix.h.

template<typename T>
std::ostream& operator ( std::ostream &  ,
const Matrix< T > &   
) [friend]

template<typename T>
friend class RowVector< T > [friend]

Definition at line 95 of file matrix.h.


Member Data Documentation

template<typename T>
T* colarray::Matrix< T >::_data [protected]

Definition at line 39 of file matrix.h.

Referenced by colarray::Matrix< T >::Matrix(), and colarray::Matrix< T >::~Matrix().

template<typename T>
int_t colarray::Matrix< T >::_ld

Definition at line 36 of file matrix.h.

Referenced by blas::gemm(), blas::gemv(), blas::gesv(), blas::getrf(), colarray::Matrix< T >::Matrix(), colarray::Matrix< T >::operator()(), and blas::syev().

template<typename T>
int_t colarray::Matrix< T >::_m

Definition at line 36 of file matrix.h.

Referenced by linalg::determinant(), linalg::eigenvalueDecomp(), linalg::eigenvalues(), colarray::Matrix< double >::fill(), fillMatrix(), blas::gemm(), blas::gemv(), blas::gesv(), colarray::Matrix< double >::get_m(), blas::getrf(), colarray::Matrix< T >::inject(), linalg::inverse(), colarray::Matrix< T >::Matrix(), colarray::Matrix< T >::operator *=(), colarray::operator<<(), colarray::Matrix< T >::operator=(), linalg::squared_sum(), and blas::syev().

template<typename T>
int_t colarray::Matrix< T >::_n

Definition at line 36 of file matrix.h.

Referenced by linalg::determinant(), linalg::eigenvalueDecomp(), linalg::eigenvalues(), colarray::Matrix< double >::fill(), fillMatrix(), blas::gemm(), blas::gemv(), blas::gesv(), colarray::Matrix< double >::get_n(), blas::getrf(), colarray::Matrix< T >::inject(), linalg::inverse(), colarray::Matrix< T >::Matrix(), colarray::Matrix< T >::operator *=(), colarray::Matrix< T >::operator=(), linalg::squared_sum(), and blas::syev().

template<typename T>
int* colarray::Matrix< T >::_refCount [protected]

Definition at line 40 of file matrix.h.

Referenced by colarray::Matrix< T >::Matrix(), and colarray::Matrix< T >::~Matrix().

template<typename T>
T* colarray::Matrix< T >::_v

Definition at line 37 of file matrix.h.

Referenced by blas::gemm(), blas::gemv(), blas::gesv(), blas::getrf(), h5_read_eigenmodes(), colarray::Matrix< T >::Matrix(), colarray::Matrix< T >::operator()(), and blas::syev().


The documentation for this class was generated from the following file:
Generated on Fri Oct 26 13:35:17 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7