OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | List of all members
FMatrix< T, M, N > Class Template Reference

A templated representation for matrices. More...

#include <IdealMapper.h>

Inheritance diagram for FMatrix< T, M, N >:
Inheritance graph
[legend]
Collaboration diagram for FMatrix< T, M, N >:
Collaboration graph
[legend]

Public Member Functions

 FMatrix ()
 Default constructor. More...
 
 FMatrix (const FMatrix &)
 Copy constructor. More...
 
 FMatrix (const FArray2D< T, R, C > &)
 Conversion from two-dimensional array. More...
 
 FMatrix (const T &t)
 Constructor. More...
 
FMatrixoperator= (const FMatrix &)
 Assignment. More...
 
 FMatrix (const T *t)
 Constructor. More...
 
FMatrixoperator= (const FArray2D< T, R, C > &)
 Convert and assign. More...
 
FMatrixoperator*= (const T &)
 Multiply by scalar and assign. More...
 
FMatrixoperator/= (const T &)
 Divide by scalar and assign. More...
 
FMatrixoperator+= (const FMatrix &)
 Add matrix and assign. More...
 
FMatrixoperator-= (const FMatrix &)
 Subtract ,atrix and assign. More...
 
FMatrix< T, C, R > transpose () const
 FMatrix transpose. More...
 
- Public Member Functions inherited from FArray2D< T, R, C >
 FArray2D ()
 Default constructor. More...
 
 FArray2D (const T &t)
 Constructor. More...
 
 FArray2D (const FArray2D &)
 Copy constructor. More...
 
const FArray2D< T, M, N > & operator= (const FArray2D< T, M, N > &)
 Assignment. More...
 
Toperator() (int r, int c)
 Get element. More...
 
const Toperator() (int r, int c) const
 Get element. More...
 
int nrows () const
 Get number of rows. More...
 
int ncols () const
 Get number of columns. More...
 
int size () const
 Get total size. More...
 
iterator begin ()
 Get beginning of data. More...
 
const_iterator begin () const
 Get beginning of data. More...
 
iterator end ()
 Get pointer past end of data. More...
 
const_iterator end () const
 Get pointer past end of data. More...
 
row_iterator row_begin (int r)
 Get row iterator. More...
 
const_row_iterator row_begin (int r) const
 Get row iterator. More...
 
row_iterator row_end (int r)
 Get row iterator. More...
 
const_row_iterator row_end (int r) const
 Get row iterator. More...
 
row_iterator operator[] (int r)
 Get row iterator. More...
 
const_row_iterator operator[] (int r) const
 Get row iterator. More...
 
col_iterator col_begin (int c)
 Get column iterator. More...
 
const_col_iterator col_begin (int c) const
 Get column iterator. More...
 
col_iterator col_end (int c)
 Get column iterator. More...
 
const_col_iterator col_end (int c) const
 Get column iterator. More...
 
void getColumn (FArray1D< T, M > &toArray, int c) const
 Fetch column. More...
 
void getRow (FArray1D< T, N > &toArray, int r) const
 Fetch row. More...
 
void putColumn (const FArray1D< T, M > &fromArray, int c)
 Store column. More...
 
void putRow (const FArray1D< T, N > &fromArray, int r)
 Store row. More...
 
void swapColumns (int c1, int c2)
 Exchange columns. More...
 
void swapRows (int r1, int r2)
 Exchange rows. More...
 

Additional Inherited Members

- Public Types inherited from FArray2D< T, R, C >
typedef T value_type
 The value type of the array. More...
 
typedef Titerator
 Iterator for the array. More...
 
typedef const Tconst_iterator
 Iterator for constant array. More...
 
typedef Trow_iterator
 Iterator for access by rows. More...
 
typedef const Tconst_row_iterator
 Iterator for access by rows. More...
 
typedef FSlice< T, N > col_iterator
 Iterator for access by columns. More...
 
typedef FConstSlice< T, N > const_col_iterator
 Iterator for access by columns. More...
 
- Protected Attributes inherited from FArray2D< T, R, C >
T data [M *N]
 
- Static Protected Attributes inherited from FArray2D< T, R, C >
static const int SIZE
 

Detailed Description

template<class T, int M, int N>
class FMatrix< T, M, N >

A templated representation for matrices.

Definition at line 26 of file IdealMapper.h.

Constructor & Destructor Documentation

template<class T , int R, int C>
FMatrix< T, R, C >::FMatrix ( )

Default constructor.

Definition at line 131 of file FMatrix.h.

template<class T, int M, int N>
FMatrix< T, M, N >::FMatrix ( const FMatrix< T, M, N > &  )

Copy constructor.

template<class T, int R, int C>
FMatrix< T, R, C >::FMatrix ( const FArray2D< T, R, C > &  rhs)

Conversion from two-dimensional array.

Definition at line 143 of file FMatrix.h.

template<class T, int R, int C>
FMatrix< T, R, C >::FMatrix ( const T t)
explicit

Constructor.

Definition at line 149 of file FMatrix.h.

template<class T, int R, int C>
FMatrix< T, R, C >::FMatrix ( const T t)
explicit

Constructor.

Definition at line 155 of file FMatrix.h.

Member Function Documentation

template<class T, int R, int C>
FMatrix< T, R, C > & FMatrix< T, R, C >::operator*= ( const T rhs)

Multiply by scalar and assign.

Definition at line 175 of file FMatrix.h.

template<class T, int M, int N>
FMatrix< T, R, C > & FMatrix< T, R, C >::operator+= ( const FMatrix< T, M, N > &  )

Add matrix and assign.

Definition at line 191 of file FMatrix.h.

References FArray2D< T, R, C >::begin().

Here is the call graph for this function:

template<class T, int M, int N>
FMatrix< T, R, C > & FMatrix< T, R, C >::operator-= ( const FMatrix< T, M, N > &  )

Subtract ,atrix and assign.

Definition at line 199 of file FMatrix.h.

References FArray2D< T, R, C >::begin().

Here is the call graph for this function:

template<class T, int R, int C>
FMatrix< T, R, C > & FMatrix< T, R, C >::operator/= ( const T rhs)

Divide by scalar and assign.

Definition at line 183 of file FMatrix.h.

template<class T, int M, int N>
FMatrix& FMatrix< T, M, N >::operator= ( const FMatrix< T, M, N > &  )

Assignment.

template<class T, int R, int C>
FMatrix< T, R, C > & FMatrix< T, R, C >::operator= ( const FArray2D< T, R, C > &  rhs)

Convert and assign.

Definition at line 168 of file FMatrix.h.

References FArray2D< T, M, N >::operator=().

Here is the call graph for this function:

template<class T , int R, int C>
FMatrix< T, C, R > FMatrix< T, R, C >::transpose ( ) const

FMatrix transpose.

Definition at line 207 of file FMatrix.h.

References FArray2D< T, R, C >::col_begin(), and Attrib::Distribution::R.

Here is the call graph for this function:


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