Warning: this documentation for the development version is under construction.

Seldon::SubMatrix< M > Class Template Reference

Sub-matrix class. More...

#include <SubMatrix.hxx>

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

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 (M &A, Vector< int > &row_list, Vector< int > &column_list)
 Main constructor.
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 GetM (const SeldonTranspose &status) const
 Returns the number of rows of the sub-matrix possibly transposed.
int GetN () const
 Returns the number of columns.
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 M>
class Seldon::SubMatrix< M >

Sub-matrix class.

<T, Prop, M, Allocator>

Definition at line 68 of file SubMatrix.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 258 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 208 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 221 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 247 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 234 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, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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 [inherited]

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, inherited]

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, inherited]

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: