SkelGIS  3.0
skelgis::DMatrix< T, 0 > Struct Template Reference

DMatrix class. More...

#include <dmatrix.hpp>

List of all members.

Public Member Functions

 DMatrix ()
 default constructor of the distributed matrix interface
 DMatrix (DMatrix_impl< T, 0 > *_m)
 constructor of the distributed matrix interface from pointer
 DMatrix (DMatrix< T, 0 > &_m)
 constructor of the distributed matrix interface with another DMatrix
 DMatrix (HEADER h, const T value, bool loc=false)
 constructor of the distributed matrix interface from a HEADER and a default value
 DMatrix (const char *binFile, bool loc=false)
 constructor of the distributed matrix interface from a binary file
 ~DMatrix ()
 destructor of the distributed matrix
void init (DMatrix_impl< T, 0 > *_m)
 initialization of the distributed matrix interface from pointer
void init (DMatrix< T, 0 > &_m)
 initialization of the distributed matrix interface from another DMatrix
void init (HEADER h, const T value, bool loc=false)
 initialization of the distributed matrix interface from a HEADER and a default value
void init (const char *binFile, bool loc=false)
 initialization of the distributed matrix interface from a binary file
void erase ()
 to erase and clear the DMatrix
getValue (iterator< T, 0 > it) const
 Methods to get the value of the matrix at the iterator it (alternative to [it])
getValue (iterator_cont< T, 0 > it) const
getValue (iterator_rev< T, 0 > it) const
getValue (iterator_step< T, 0 > it) const
setValue (iterator< T, 0 > it, T value)
 Methods to set the value of the matrix at the iterator it (alternative to [it]=)
setValue (iterator_cont< T, 0 > it, T value)
setValue (iterator_rev< T, 0 > it, T value)
setValue (iterator_step< T, 0 > it, T value)
iterator< T, 0 > begin ()
 Get the beginning iterator of the DMatrix (on the first element of the DMatrix)
iterator_cont< T, 0 > begin_cont ()
iterator_rev< T, 0 > begin_rev ()
iterator_step< T, 0 > begin_step (int step, int nb)
iterator_line< T, 0 > begin_line ()
iterator< T, 0 > end ()
 Get the ending iterator of the DMatrix (on the last element of the DMatrix)
iterator_cont< T, 0 > end_cont ()
iterator_rev< T, 0 > end_rev ()
iterator_step< T, 0 > end_step ()
iterator_line< T, 0 > end_line ()
T & operator[] (iterator< T, 0 > it)
 Operator [] to get and set an element of the matrix at iterator it.
T & operator[] (iterator_cont< T, 0 > it)
T & operator[] (iterator_rev< T, 0 > it)
T & operator[] (iterator_step< T, 0 > it)
DMatrix< T, 0, true > & operator= (DMatrix< T, 0, true > &right)
 Operator = to assign the current DMatrix interface object to another one.
void print ()
 Print the matrix by block.
void printAll ()
 Print all the matrix by block.
void write (char *binFile)
 Saving in a bin file the distributed matrix interface.
iterator< T, 0 > getIterator (int x, int y)
 Get the iterator on the matrix at position (x,y)
iterator< T, 0 > getIterator_cont (int x, int y)
iterator< T, 0 > getIterator_rev (int x, int y)
void getIndexes (iterator< T, 0 > it, int &col, int &li)
 Get the indexes of the iterator on the matrix.
void getIndexes (iterator_cont< T, 0 > it, int &col, int &li)
void getIndexes (iterator_rev< T, 0 > it, int &col, int &li)
HEADER getGlobalHeader ()
 Get the global header of the DMatrix.
HEADER getHeader ()
 Get the header of the DMatrix.
int getCols ()
 Get the number of columns in the domain decomposition.
int getRows ()
 Get the number of rows in the domain decomposition.
int getCol ()
 Get the column number of the DMatrix.
int getRow ()
 Get the row number of the DMatrix.
T * getData ()
 Get the data table of the DMatrix.
DMatrix_impl< T, 0, true > * getDMatrix ()
 Get the DMatrix_impl associated to the DMatrix interface.

Protected Attributes

DMatrix_impl< T, 0 > * m
 Pointer to DMatrix_impl object.

Detailed Description

template<class T>
struct skelgis::DMatrix< T, 0 >

DMatrix class.

template of the distributed matrix of SkelGIS. This is the second specialization of the DMatrix.

Template Parameters:
Tis the type of data to store in the DMatrix R overlap template parameter is not asked and specialized to 0. The default value of line is used (true).

Definition at line 1497 of file dmatrix.hpp.


Constructor & Destructor Documentation

template<class T >
skelgis::DMatrix< T, 0 >::DMatrix ( DMatrix_impl< T, 0 > *  _m) [inline]

constructor of the distributed matrix interface from pointer

This Constructor is used in the user function when a skeleton ApplyList is called.

Parameters:
_mis a DMatrix_impl pointer

Definition at line 1518 of file dmatrix.hpp.

template<class T >
skelgis::DMatrix< T, 0 >::DMatrix ( DMatrix< T, 0 > &  _m) [inline]

constructor of the distributed matrix interface with another DMatrix

It is possible to construct a DMatrix instance from another DMatrix instance

Parameters:
_mis a DMatrix object

Definition at line 1526 of file dmatrix.hpp.

template<class T >
skelgis::DMatrix< T, 0 >::DMatrix ( HEADER  h,
const T  value,
bool  loc = false 
) [inline]

constructor of the distributed matrix interface from a HEADER and a default value

The HEADER essentially define the size of the DMatrix, while the default value is given to each element of the DMatrix.

Parameters:
his the header to construct the object (see skelgis/util/utility.hpp)
valueis the default value to put in the matrix
locis a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction).

Definition at line 1536 of file dmatrix.hpp.

template<class T >
skelgis::DMatrix< T, 0 >::DMatrix ( const char *  binFile,
bool  loc = false 
) [inline]

constructor of the distributed matrix interface from a binary file

A specific binary file format is read by SkelGIS. A Dmatrix instance can be constructed from a binary file.

Parameters:
binFileis a binary input file to construct the DMatrix with
locis a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction).

Definition at line 1545 of file dmatrix.hpp.


Member Function Documentation

template<class T >
iterator<T,0> skelgis::DMatrix< T, 0 >::begin ( ) [inline]

Get the beginning iterator of the DMatrix (on the first element of the DMatrix)

This method exists for each type of iterator in SkelGIS.

Returns:
the iterator of the first element

Definition at line 1625 of file dmatrix.hpp.

template<class T >
iterator<T,0> skelgis::DMatrix< T, 0 >::end ( ) [inline]

Get the ending iterator of the DMatrix (on the last element of the DMatrix)

This method exists for each type of iterator in SkelGIS.

Returns:
the iterator of the last element

Definition at line 1637 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::erase ( ) [inline]

to erase and clear the DMatrix

The equivalent to the erase of a std::vector in the STL. The erase will empty the DMatrix and will deallocate the memory space associated. This has to be done when the DMatrix is not usefull anymore.

Definition at line 1593 of file dmatrix.hpp.

template<class T >
int skelgis::DMatrix< T, 0 >::getCol ( ) [inline]

Get the column number of the DMatrix.

Returns:
the column number of the DMatrix

Definition at line 1744 of file dmatrix.hpp.

template<class T >
int skelgis::DMatrix< T, 0 >::getCols ( ) [inline]

Get the number of columns in the domain decomposition.

Returns:
the number of columns in the domain decomposition

Definition at line 1730 of file dmatrix.hpp.

template<class T >
T* skelgis::DMatrix< T, 0 >::getData ( ) [inline]

Get the data table of the DMatrix.

Returns:
the data table of the DMatrix

Definition at line 1758 of file dmatrix.hpp.

template<class T >
DMatrix_impl<T,0,true>* skelgis::DMatrix< T, 0 >::getDMatrix ( ) [inline]

Get the DMatrix_impl associated to the DMatrix interface.

Returns:
the DMatrix_impl

Definition at line 1765 of file dmatrix.hpp.

template<class T >
HEADER skelgis::DMatrix< T, 0 >::getGlobalHeader ( ) [inline]

Get the global header of the DMatrix.

Returns:
the global header

Definition at line 1716 of file dmatrix.hpp.

template<class T >
HEADER skelgis::DMatrix< T, 0 >::getHeader ( ) [inline]

Get the header of the DMatrix.

Returns:
the header

Definition at line 1723 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::getIndexes ( iterator< T, 0 >  it,
int &  col,
int &  li 
) [inline]

Get the indexes of the iterator on the matrix.

This method exists for the three basic types of iterators.

Parameters:
itis the iterator from which the indexes will be taken
xis the iterator position x returned
yis the iterator position y returned

Definition at line 1706 of file dmatrix.hpp.

template<class T >
iterator<T,0> skelgis::DMatrix< T, 0 >::getIterator ( int  x,
int  y 
) [inline]

Get the iterator on the matrix at position (x,y)

This method exists for the three basic types of iterators.

Parameters:
xis row index y is column index
Returns:
returns the iterator at position (x,y)

Definition at line 1694 of file dmatrix.hpp.

template<class T >
int skelgis::DMatrix< T, 0 >::getRow ( ) [inline]

Get the row number of the DMatrix.

Returns:
the row number of the DMatrix

Definition at line 1751 of file dmatrix.hpp.

template<class T >
int skelgis::DMatrix< T, 0 >::getRows ( ) [inline]

Get the number of rows in the domain decomposition.

Returns:
the number of rows in the domain decomposition

Definition at line 1737 of file dmatrix.hpp.

template<class T >
T skelgis::DMatrix< T, 0 >::getValue ( iterator< T, 0 >  it) const [inline]

Methods to get the value of the matrix at the iterator it (alternative to [it])

This method exists for each type of iterator in SkelGIS. This method is const as the value returned could not be modified.

Parameters:
itis the iterator position
Returns:
the value at the iterator it

Definition at line 1602 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::init ( DMatrix_impl< T, 0 > *  _m) [inline]

initialization of the distributed matrix interface from pointer

The equivalent to the constructor from a pointer

Parameters:
_mis a DMatrix_impl object

Definition at line 1557 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::init ( DMatrix< T, 0 > &  _m) [inline]

initialization of the distributed matrix interface from another DMatrix

The equivalent to the constructor from another DMatrix

Parameters:
_mis a DMatrix object

Definition at line 1565 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::init ( HEADER  h,
const T  value,
bool  loc = false 
) [inline]

initialization of the distributed matrix interface from a HEADER and a default value

The equivalent to the constructor from a HEADER and a default value

Parameters:
his the header to construct the object (see skelgis/util/utility.hpp)
valueis the default value to put in the matrix
locis a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction).

Definition at line 1575 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::init ( const char *  binFile,
bool  loc = false 
) [inline]

initialization of the distributed matrix interface from a binary file

The equivalent to the constructor from a binary file

Parameters:
binFileis a binary input file to construct the DMatrix with
locis a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction).

Definition at line 1584 of file dmatrix.hpp.

template<class T >
DMatrix<T,0,true>& skelgis::DMatrix< T, 0 >::operator= ( DMatrix< T, 0, true > &  right) [inline]

Operator = to assign the current DMatrix interface object to another one.

Parameters:
rightis the other DMatrix object
Returns:
the reference to the new current DMatrix object

Definition at line 1661 of file dmatrix.hpp.

template<class T >
T& skelgis::DMatrix< T, 0 >::operator[] ( iterator< T, 0 >  it) [inline]

Operator [] to get and set an element of the matrix at iterator it.

This method exists for each type of iterator in SkelGIS.

Parameters:
itis the iterator position
Returns:
the reference to the value at it

Definition at line 1650 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::print ( ) [inline]

Print the matrix by block.

This method will print the DMatrix by processors in the directory "outputs".

Definition at line 1668 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::printAll ( ) [inline]

Print all the matrix by block.

This method will print the DMatrix by processors in the directory "outputs". It will also print the physical border of the DMatrix and the parallel overlap of the DMatrix.

Definition at line 1676 of file dmatrix.hpp.

template<class T >
T skelgis::DMatrix< T, 0 >::setValue ( iterator< T, 0 >  it,
value 
) [inline]

Methods to set the value of the matrix at the iterator it (alternative to [it]=)

This method exists for each type of iterator in SkelGIS.

Parameters:
itis the iterator position
valueis the value to set

Definition at line 1614 of file dmatrix.hpp.

template<class T >
void skelgis::DMatrix< T, 0 >::write ( char *  binFile) [inline]

Saving in a bin file the distributed matrix interface.

This method writes the DMatrix in a single binary output file.

Parameters:
binFileis a binary output file to save the DMatrix in

Definition at line 1684 of file dmatrix.hpp.


Member Data Documentation

template<class T >
DMatrix_impl<T,0>* skelgis::DMatrix< T, 0 >::m [protected]

Pointer to DMatrix_impl object.

The pointer to Dmatrix_impl object is the real distributed matrix object. DMatrix class is the user interface to this object.

Definition at line 1505 of file dmatrix.hpp.


The documentation for this struct was generated from the following file:
 All Classes Files Functions Variables Defines