Seldon::Matrix_Base< T, Allocator > Class Template Reference

Base class for all matrices. More...

#include <Matrix_Base.hxx>

Inheritance diagram for Seldon::Matrix_Base< T, Allocator >:
Seldon::Matrix_ComplexSparse< T, Prop, ColComplexSparse, Allocator > Seldon::Matrix_ComplexSparse< T, Prop, RowComplexSparse, Allocator > Seldon::Matrix_Hermitian< T, Prop, ColHerm, Allocator > Seldon::Matrix_Hermitian< T, Prop, RowHerm, Allocator > Seldon::Matrix_HermPacked< T, Prop, ColHermPacked, Allocator > Seldon::Matrix_HermPacked< T, Prop, RowHermPacked, Allocator > Seldon::Matrix_Pointers< T, Prop, ColMajor, Allocator > Seldon::Matrix_Pointers< T, Prop, RowMajor, Allocator > Seldon::Matrix_Sparse< T, Prop, ColSparse, Allocator > Seldon::Matrix_Sparse< T, Prop, RowSparse, Allocator > Seldon::Matrix_SymComplexSparse< T, Prop, ColSymComplexSparse, Allocator > Seldon::Matrix_SymComplexSparse< T, Prop, RowSymComplexSparse, Allocator > Seldon::Matrix_Symmetric< T, Prop, ColSym, Allocator > Seldon::Matrix_Symmetric< T, Prop, RowSym, Allocator > Seldon::Matrix_SymPacked< T, Prop, ColSymPacked, Allocator > Seldon::Matrix_SymPacked< T, Prop, RowSymPacked, Allocator > Seldon::Matrix_SymSparse< T, Prop, ColSymSparse, Allocator > Seldon::Matrix_SymSparse< T, Prop, RowSymSparse, Allocator > Seldon::Matrix_TriangPacked< T, Prop, ColLoTriangPacked, Allocator > Seldon::Matrix_TriangPacked< T, Prop, ColUpTriangPacked, Allocator > Seldon::Matrix_TriangPacked< T, Prop, RowLoTriangPacked, Allocator > Seldon::Matrix_TriangPacked< T, Prop, RowUpTriangPacked, Allocator > Seldon::Matrix_Triangular< T, Prop, ColLoTriang, Allocator > Seldon::Matrix_Triangular< T, Prop, ColUpTriang, Allocator > Seldon::Matrix_Triangular< T, Prop, RowLoTriang, Allocator > Seldon::Matrix_Triangular< T, Prop, RowUpTriang, Allocator > Seldon::MatrixCollection< T, Prop, ColMajor, Allocator > Seldon::MatrixCollection< T, Prop, ColSymPacked, Allocator > Seldon::MatrixCollection< T, Prop, RowMajor, Allocator > Seldon::MatrixCollection< T, Prop, RowSymPacked, Allocator > Seldon::PetscMatrix< T, Prop, RowMajor, Allocator > Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator > Seldon::Matrix_Hermitian< T, Prop, Storage, Allocator > Seldon::Matrix_HermPacked< T, Prop, Storage, Allocator > Seldon::Matrix_Pointers< T, Prop, Storage, Allocator > Seldon::Matrix_Sparse< T, Prop, Storage, Allocator > Seldon::Matrix_SymComplexSparse< T, Prop, Storage, Allocator > Seldon::Matrix_Symmetric< T, Prop, Storage, Allocator > Seldon::Matrix_SymPacked< T, Prop, Storage, Allocator > Seldon::Matrix_SymSparse< T, Prop, Storage, Allocator > Seldon::Matrix_TriangPacked< T, Prop, Storage, Allocator > Seldon::Matrix_Triangular< T, Prop, Storage, Allocator > Seldon::MatrixCollection< T, Prop, Storage, Allocator > Seldon::PetscMatrix< T, Prop, Storage, Allocator > Seldon::SubMatrix_Base< T, Prop, M, Allocator >

List of all members.

Public Types

typedef Allocator::value_type value_type
typedef Allocator::pointer pointer
typedef Allocator::const_pointer const_pointer
typedef Allocator::reference reference
typedef Allocator::const_reference const_reference

Public Member Functions

 Matrix_Base ()
 Default constructor.
 Matrix_Base (int i, int j)
 Main constructor.
 Matrix_Base (const Matrix_Base< T, Allocator > &A)
 Copy constructor.
 ~Matrix_Base ()
 Destructor.
int GetM () const
 Returns the number of rows.
int GetN () const
 Returns the number of columns.
int GetM (const Seldon::SeldonTranspose &status) const
 Returns the number of rows of the matrix possibly transposed.
int GetN (const Seldon::SeldonTranspose &status) const
 Returns the number of columns of the matrix possibly transposed.
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

int m_
int n_
pointer data_

Static Protected Attributes

static Allocator allocator_

Detailed Description

template<class T, class Allocator = SELDON_DEFAULT_ALLOCATOR<T>>
class Seldon::Matrix_Base< T, Allocator >

Base class for all matrices.

It stores some data and matrix dimensions. It defines basic methods as well.

Definition at line 40 of file Matrix_Base.hxx.


Constructor & Destructor Documentation

template<class T , class Allocator >
Seldon::Matrix_Base< T, Allocator >::Matrix_Base (  )  [inline]

Default constructor.

On exit, the matrix is an empty 0x0 matrix.

Definition at line 36 of file Matrix_Base.cxx.

template<class T , class Allocator >
Seldon::Matrix_Base< T, Allocator >::Matrix_Base ( int  i,
int  j 
) [inline, explicit]

Main constructor.

Builds a i x j matrix, but data array is not initialized.

Parameters:
i number of rows.
j number of columns.
Warning:
the data array is not allocated.

Definition at line 51 of file Matrix_Base.cxx.

template<class T, class Allocator>
Seldon::Matrix_Base< T, Allocator >::Matrix_Base ( const Matrix_Base< T, Allocator > &  A  )  [inline]

Copy constructor.

Parameters:
A base matrix to be copied.
Warning:
Only the length is copied.

Definition at line 73 of file Matrix_Base.cxx.

template<class T , class Allocator >
Seldon::Matrix_Base< T, Allocator >::~Matrix_Base (  )  [inline]

Destructor.

Note:
Memory for the data array is not freed.

Definition at line 91 of file Matrix_Base.cxx.


Member Function Documentation

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

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

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

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

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

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 Allocator >
int Seldon::Matrix_Base< T, Allocator >::GetM ( const Seldon::SeldonTranspose status  )  const

Returns the number of rows of the matrix possibly transposed.

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

Reimplemented in Seldon::SubMatrix_Base< T, Prop, M, Allocator >.

Definition at line 130 of file Matrix_Base.cxx.

template<class T , class Allocator >
int Seldon::Matrix_Base< T, Allocator >::GetN ( const Seldon::SeldonTranspose status  )  const

Returns the number of columns of the matrix possibly transposed.

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

Reimplemented in Seldon::SubMatrix_Base< T, Prop, M, Allocator >.

Definition at line 145 of file Matrix_Base.cxx.

template<class T , class Allocator >
int Seldon::Matrix_Base< T, Allocator >::GetSize (  )  const

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