Main Page | User's Guide | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class 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::Matrix_ComplexSparse< T, Prop, Storage, Allocator > Seldon::Matrix_ComplexSparse< T, Prop, ColComplexSparse, Allocator > Seldon::Matrix_ComplexSparse< T, Prop, RowComplexSparse, Allocator > Seldon::Matrix_Hermitian< T, Prop, Storage, Allocator > Seldon::Matrix_Hermitian< T, Prop, ColHerm, Allocator > Seldon::Matrix_Hermitian< T, Prop, RowHerm, Allocator > Seldon::Matrix_HermPacked< T, Prop, Storage, Allocator > Seldon::Matrix_HermPacked< T, Prop, ColHermPacked, Allocator > Seldon::Matrix_HermPacked< T, Prop, RowHermPacked, Allocator > Seldon::Matrix_Pointers< T, Prop, Storage, Allocator > Seldon::Matrix_Pointers< T, Prop, ColMajor, Allocator > Seldon::Matrix_Pointers< T, Prop, RowMajor, Allocator > Seldon::Matrix_Sparse< T, Prop, Storage, Allocator > Seldon::Matrix_Sparse< T, Prop, ColSparse, Allocator > Seldon::Matrix_Sparse< T, Prop, RowSparse, Allocator > Seldon::Matrix_SymComplexSparse< T, Prop, Storage, Allocator > Seldon::Matrix_SymComplexSparse< T, Prop, ColSymComplexSparse, Allocator > Seldon::Matrix_SymComplexSparse< T, Prop, RowSymComplexSparse, Allocator > Seldon::Matrix_Symmetric< T, Prop, Storage, Allocator > Seldon::Matrix_Symmetric< T, Prop, ColSym, Allocator > Seldon::Matrix_Symmetric< T, Prop, RowSym, Allocator > Seldon::Matrix_SymPacked< T, Prop, Storage, Allocator > Seldon::Matrix_SymPacked< T, Prop, ColSymPacked, Allocator > Seldon::Matrix_SymPacked< T, Prop, RowSymPacked, Allocator > Seldon::Matrix_SymSparse< T, Prop, Storage, Allocator > Seldon::Matrix_SymSparse< T, Prop, ColSymSparse, Allocator > Seldon::Matrix_SymSparse< T, Prop, RowSymSparse, Allocator > Seldon::Matrix_TriangPacked< T, Prop, Storage, 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, Storage, 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 > 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)
 Matrix_Base (int i, int j)
 Main constructor.
 ~Matrix_Base ()
 Destructor.
int GetM () const
 Returns the number of rows.
int GetN () const
 Returns the number of columns.
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.

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.


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.

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

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.

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

Destructor.

Note:
Memory for the data array is not freed.


Member Function Documentation

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.

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.

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.

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.

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

Returns the number of rows.

Returns:
The number of rows.

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

Returns the number of columns.

Returns:
The number of columns.

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

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.


The documentation for this class was generated from the following files:
Generated on Sun Jan 16 23:38:01 2005 for Multivac by  doxygen 1.4.0