Seldon::SubMatrix_Base< T, Prop, M, Allocator > Class Template Reference

Sub-matrix base class. More...

#include <SubMatrix_Base.hxx>

Inheritance diagram for Seldon::SubMatrix_Base< T, Prop, M, Allocator >:
Seldon::Matrix_Base< T, Allocator > Seldon::Matrix< T, Prop, SubStorage< M >, Allocator > Seldon::SubMatrix< M >

List of all members.

Public Types

typedef M::value_type value_type
typedef M::pointer pointer
typedef M::const_pointer const_pointer
typedef M::reference reference
typedef M::const_reference const_reference
typedef M::entry_type entry_type
typedef M::access_type access_type
typedef M::const_access_type const_access_type

Public Member Functions

 SubMatrix_Base (M &A, Vector< int > &row_list, Vector< int > &column_list)
 Main constructor.
 ~SubMatrix_Base ()
 Destructor.
access_type operator() (int i, int j)
 Access operator.
const_access_type operator() (int i, int j) const
 Access operator.
entry_type & Val (int i, int j)
 Access operator.
const entry_type & Val (int i, int j) const
 Access operator.
int GetM () const
 Returns the number of rows.
int GetN () const
 Returns the number of columns.
int GetM (const SeldonTranspose &status) const
 Returns the number of rows of the sub-matrix possibly transposed.
int GetN (const SeldonTranspose &status) const
 Returns the number of columns of the sub-matrix possibly transposed.
void Print () const
 Prints a matrix on screen.
int GetSize () const
 Returns the number of elements in the matrix.
pointer GetData () const
 Returns a pointer to the data array.
const_pointer GetDataConst () const
 Returns a const pointer to the data array.
void * GetDataVoid () const
 Returns a pointer of type "void*" to the data array.
const void * GetDataConstVoid () const
 Returns a pointer of type "const void*" to the data array.
Allocator & GetAllocator ()
 Returns the allocator of the matrix.

Protected Attributes

M * matrix_
 Pointer to the base matrix.
Vector< int > row_list_
 List of rows.
Vector< int > column_list_
 List of columns.
int m_
int n_
pointer data_

Static Protected Attributes

static Allocator allocator_

Detailed Description

template<class T, class Prop, class M, class Allocator>
class Seldon::SubMatrix_Base< T, Prop, M, Allocator >

Sub-matrix base class.

Definition at line 29 of file SubMatrix_Base.hxx.


Member Function Documentation

template<class T , class Allocator >
Allocator & Seldon::Matrix_Base< T, Allocator >::GetAllocator (  )  [inherited]

Returns the allocator of the matrix.

Returns:
The allocator.

Definition at line 257 of file Matrix_Base.cxx.

template<class T , class Allocator >
Matrix_Base< T, Allocator >::pointer Seldon::Matrix_Base< T, Allocator >::GetData (  )  const [inherited]

Returns a pointer to the data array.

Returns a pointer to data, i.e. the data array 'data_'.

Returns:
A pointer to the data array.

Definition at line 207 of file Matrix_Base.cxx.

template<class T , class Allocator >
Matrix_Base< T, Allocator >::const_pointer Seldon::Matrix_Base< T, Allocator >::GetDataConst (  )  const [inherited]

Returns a const pointer to the data array.

Returns a const pointer to data, i.e. the data array 'data_'.

Returns:
A const pointer to the data array.

Definition at line 220 of file Matrix_Base.cxx.

template<class T , class Allocator >
const void * Seldon::Matrix_Base< T, Allocator >::GetDataConstVoid (  )  const [inherited]

Returns a pointer of type "const void*" to the data array.

Returns a pointer of type "const void*" to data, i.e. the data array 'data_'.

Returns:
A const pointer of type "void*" to the data array.

Definition at line 246 of file Matrix_Base.cxx.

template<class T , class Allocator >
void * Seldon::Matrix_Base< T, Allocator >::GetDataVoid (  )  const [inherited]

Returns a pointer of type "void*" to the data array.

Returns a pointer of type "void*" to data, i.e. the data array 'data_'.

Returns:
A pointer of type "void*" to the data array.

Definition at line 233 of file Matrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
int Seldon::SubMatrix_Base< T, Prop, M, Allocator >::GetM (  )  const [inline]

Returns the number of rows.

Returns:
The number of rows.

Reimplemented from Seldon::Matrix_Base< T, Allocator >.

Definition at line 134 of file SubMatrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
int Seldon::SubMatrix_Base< T, Prop, M, Allocator >::GetM ( const SeldonTranspose status  )  const [inline]

Returns the number of rows of the sub-matrix possibly transposed.

Parameters:
status assumed status about the transposition of the sub-matrix.
Returns:
The number of rows of the possibly-transposed sub-matrix.

Reimplemented from Seldon::Matrix_Base< T, Allocator >.

Definition at line 158 of file SubMatrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
int Seldon::SubMatrix_Base< T, Prop, M, Allocator >::GetN ( const SeldonTranspose status  )  const [inline]

Returns the number of columns of the sub-matrix possibly transposed.

Parameters:
status assumed status about the transposition of the sub-matrix.
Returns:
The number of columns of the possibly-transposed sub-matrix.

Reimplemented from Seldon::Matrix_Base< T, Allocator >.

Definition at line 174 of file SubMatrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
int Seldon::SubMatrix_Base< T, Prop, M, Allocator >::GetN (  )  const [inline]

Returns the number of columns.

Returns:
The number of columns.

Reimplemented from Seldon::Matrix_Base< T, Allocator >.

Definition at line 145 of file SubMatrix_Base.cxx.

template<class T , class Allocator >
int Seldon::Matrix_Base< T, Allocator >::GetSize (  )  const [inherited]
template<class T , class Prop , class M , class Allocator >
SubMatrix_Base< T, Prop, M, Allocator >::access_type Seldon::SubMatrix_Base< T, Prop, M, Allocator >::operator() ( int  i,
int  j 
) [inline]

Access operator.

Returns the value of element (i, j).

Parameters:
[in] i row index.
[in] j column index.
Returns:
Element (i, j) of the sub-matrix.

Definition at line 73 of file SubMatrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
SubMatrix_Base< T, Prop, M, Allocator >::const_access_type Seldon::SubMatrix_Base< T, Prop, M, Allocator >::operator() ( int  i,
int  j 
) const [inline]

Access operator.

Returns the value of element (i, j).

Parameters:
[in] i row index.
[in] j column index.
Returns:
Element (i, j) of the sub-matrix.

Definition at line 88 of file SubMatrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
void Seldon::SubMatrix_Base< T, Prop, M, Allocator >::Print (  )  const

Prints a matrix on screen.

Displays all elements on the standard output, in text format. Each row is displayed on a single line, and the elements of a row are delimited by tabulations.

Definition at line 189 of file SubMatrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
SubMatrix_Base< T, Prop, M, Allocator >::entry_type & Seldon::SubMatrix_Base< T, Prop, M, Allocator >::Val ( int  i,
int  j 
) [inline]

Access operator.

Returns the value of element (i, j).

Parameters:
[in] i row index.
[in] j column index.
Returns:
Element (i, j) of the sub-matrix.

Definition at line 103 of file SubMatrix_Base.cxx.

template<class T , class Prop , class M , class Allocator >
const SubMatrix_Base< T, Prop, M, Allocator >::entry_type & Seldon::SubMatrix_Base< T, Prop, M, Allocator >::Val ( int  i,
int  j 
) const [inline]

Access operator.

Returns the value of element (i, j).

Parameters:
[in] i row index.
[in] j column index.
Returns:
Element (i, j) of the sub-matrix.

Definition at line 118 of file SubMatrix_Base.cxx.


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