Public Types | Public Member Functions | Protected Attributes | List of all members
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 > Seldon::VirtualMatrix< T >

Public Types

typedef M::reference reference
 
typedef M::value_type value_type
 
typedef M::pointer pointer
 
typedef M::const_pointer const_pointer
 
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
 
typedef M storage
 

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. More...
 
const_access_type operator() (int i, int j) const
 Access operator. More...
 
entry_type & Val (int i, int j)
 Access operator. More...
 
const entry_type & Val (int i, int j) const
 Access operator. More...
 
int GetM () const
 Returns the number of rows. More...
 
int GetM (const SeldonTranspose &status) const
 Returns the number of rows of the sub-matrix possibly transposed. More...
 
int GetM (const CBLAS_TRANSPOSE &status) const
 Returns the number of rows of the matrix possibly transposed. More...
 
int GetN () const
 Returns the number of columns. More...
 
int GetN (const SeldonTranspose &status) const
 Returns the number of columns of the sub-matrix possibly transposed. More...
 
int GetN (const CBLAS_TRANSPOSE &status) const
 Returns the number of columns of the matrix possibly transposed. More...
 
void Print () const
 Prints a matrix on screen. More...
 
pointer GetData () const
 Returns a pointer to the data array. More...
 
const_pointer GetDataConst () const
 Returns a const pointer to the data array. More...
 
void * GetDataVoid () const
 Returns a pointer of type "void*" to the data array. More...
 
const void * GetDataConstVoid () const
 Returns a pointer of type "const void*" to the data array. More...
 
long GetSize () const
 Returns the number of elements in the matrix. More...
 

Protected Attributes

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

Detailed Description

template<class M>
class Seldon::SubMatrix< M >

Sub-matrix class.

<T, Prop, M, Allocator>

Definition at line 70 of file SubMatrix.hxx.

Member Function Documentation

◆ GetData()

template<class T , class Allocator >
Matrix_Base< T, Allocator >::pointer Seldon::Matrix_Base< T, Allocator >::GetData
inlineinherited

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 241 of file Matrix_BaseInline.cxx.

◆ GetDataConst()

template<class T , class Allocator >
Matrix_Base< T, Allocator >::const_pointer Seldon::Matrix_Base< T, Allocator >::GetDataConst
inlineinherited

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 254 of file Matrix_BaseInline.cxx.

◆ GetDataConstVoid()

template<class T , class Allocator >
const void * Seldon::Matrix_Base< T, Allocator >::GetDataConstVoid
inlineinherited

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 280 of file Matrix_BaseInline.cxx.

◆ GetDataVoid()

template<class T , class Allocator >
void * Seldon::Matrix_Base< T, Allocator >::GetDataVoid
inlineinherited

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 267 of file Matrix_BaseInline.cxx.

◆ GetM() [1/3]

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

Returns the number of rows.

Returns
The number of rows.

Definition at line 137 of file SubMatrix_BaseInline.cxx.

◆ GetM() [2/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetM ( const CBLAS_TRANSPOSE &  status) const
inlineinherited

Returns the number of rows of the matrix possibly transposed.

Parameters
statusassumed status about the transposition of the matrix.
Returns
The number of rows of the possibly-transposed matrix.

Definition at line 122 of file Matrix_BaseInline.cxx.

◆ GetM() [3/3]

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

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

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

Definition at line 161 of file SubMatrix_BaseInline.cxx.

◆ GetN() [1/3]

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

Returns the number of columns.

Returns
The number of columns.

Definition at line 148 of file SubMatrix_BaseInline.cxx.

◆ GetN() [2/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetN ( const CBLAS_TRANSPOSE &  status) const
inlineinherited

Returns the number of columns of the matrix possibly transposed.

Parameters
statusassumed status about the transposition of the matrix.
Returns
The number of columns of the possibly-transposed matrix.

Definition at line 137 of file Matrix_BaseInline.cxx.

◆ GetN() [3/3]

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

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

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

Definition at line 177 of file SubMatrix_BaseInline.cxx.

◆ GetSize()

template<class T >
long Seldon::VirtualMatrix< T >::GetSize
inlineinherited

Returns the number of elements in the matrix.

Returns the number of elements in the matrix, i.e. the number of rows multiplied by the number of columns.

Returns
The number of elements in the matrix.

Definition at line 153 of file Matrix_BaseInline.cxx.

◆ operator()() [1/2]

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 
)
inlineinherited

Access operator.

Returns the value of element (i, j).

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Element (i, j) of the sub-matrix.

Definition at line 76 of file SubMatrix_BaseInline.cxx.

◆ operator()() [2/2]

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
inlineinherited

Access operator.

Returns the value of element (i, j).

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Element (i, j) of the sub-matrix.

Definition at line 91 of file SubMatrix_BaseInline.cxx.

◆ Print()

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

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 192 of file SubMatrix_BaseInline.cxx.

◆ Val() [1/2]

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 
)
inlineinherited

Access operator.

Returns the value of element (i, j).

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Element (i, j) of the sub-matrix.

Definition at line 106 of file SubMatrix_BaseInline.cxx.

◆ Val() [2/2]

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
inlineinherited

Access operator.

Returns the value of element (i, j).

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Element (i, j) of the sub-matrix.

Definition at line 121 of file SubMatrix_BaseInline.cxx.


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