Public Types | Public Member Functions | Protected Attributes | List of all members
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::VirtualMatrix< T > 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::SubMatrix_Base< T, Prop, M, Allocator >

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

Protected Attributes

pointer data_
 
int m_
 
int n_
 

Detailed Description

template<class T, class Allocator = typename SeldonDefaultAllocator<VectFull, T>::allocator>
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 143 of file Matrix_Base.hxx.

Constructor & Destructor Documentation

◆ Matrix_Base() [1/3]

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

◆ Matrix_Base() [2/3]

template<class T , class Allocator >
Seldon::Matrix_Base< T, Allocator >::Matrix_Base ( int  i,
int  j 
)
inlineexplicit

Main constructor.

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

Parameters
inumber of rows.
jnumber of columns.
Warning
the data array is not allocated.

Definition at line 191 of file Matrix_BaseInline.cxx.

◆ Matrix_Base() [3/3]

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

Copy constructor.

Parameters
Abase matrix to be copied.
Warning
Only the length is copied.

Definition at line 205 of file Matrix_BaseInline.cxx.

◆ ~Matrix_Base()

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

Member Function Documentation

◆ GetData()

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

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
inline

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
inline

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
inline

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 >
int Seldon::VirtualMatrix< T >::GetM
inlineinherited

Returns the number of rows.

Returns
The number of rows.

Definition at line 69 of file Matrix_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 >
int Seldon::VirtualMatrix< T >::GetM ( const Seldon::SeldonTranspose 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 92 of file Matrix_BaseInline.cxx.

◆ GetN() [1/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetN
inlineinherited

Returns the number of columns.

Returns
The number of columns.

Definition at line 80 of file Matrix_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 >
int Seldon::VirtualMatrix< T >::GetN ( const Seldon::SeldonTranspose 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 107 of file Matrix_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.


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