OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
Matrix< dim, T > Class Template Reference

This class implement an NxN (dense) matrix. More...

Detailed Description

template<unsigned int dim, typename T>
class Matrix< dim, T >

This class implement an NxN (dense) matrix.

Be carefull when you allocate locally it take memory from the stack

Template Parameters
dimdimensionality
Ttype of the space
Warning
Matrix is untested so it remain as concept usage until test are not introduced

Definition at line 32 of file Matrix.hpp.

#include <Matrix.hpp>

Public Types

typedef T coord_type
 
typedef boost::fusion::vector< T[dim][dim]> type
 boost fusion that store the point
 

Public Member Functions

get (size_t i, size_t j) const
 Get coordinate.
 
T & get (size_t i, size_t j)
 Get coordinate.
 
Matrix< dim, T > & operator= (const Matrix< dim, T > &m)
 operator= between Matrix
 
void zero ()
 Set to zero the point coordinate.
 
 Matrix (const Matrix< dim, T > &&p)
 Point constructor from point.
 
 Matrix (const Matrix< dim, T > &p)
 Point constructor from point.
 
 Matrix (const T(&p)[dim][dim])
 Constructor from an array.
 
 Matrix ()
 Default contructor.
 

Static Public Member Functions

static Matrix< dim, T > identity ()
 Identity matrix.
 

Data Fields

type data
 structure that store the data of the point
 

Static Public Attributes

static const unsigned int mat = 0
 Property id of the point.
 
static const unsigned int max_prop = 1
 1 property
 
static const unsigned int dims = dim
 dimension of the matrix (it is a square matrix)
 

Member Typedef Documentation

◆ coord_type

template<unsigned int dim, typename T >
typedef T Matrix< dim, T >::coord_type

Definition at line 36 of file Matrix.hpp.

◆ type

template<unsigned int dim, typename T >
typedef boost::fusion::vector<T[dim][dim]> Matrix< dim, T >::type

boost fusion that store the point

Definition at line 39 of file Matrix.hpp.

Constructor & Destructor Documentation

◆ Matrix() [1/4]

template<unsigned int dim, typename T >
Matrix< dim, T >::Matrix ( const Matrix< dim, T > &&  p)
inline

Point constructor from point.

Parameters
pthe point

Definition at line 109 of file Matrix.hpp.

◆ Matrix() [2/4]

template<unsigned int dim, typename T >
Matrix< dim, T >::Matrix ( const Matrix< dim, T > &  p)
inline

Point constructor from point.

Parameters
pthe point

Definition at line 125 of file Matrix.hpp.

◆ Matrix() [3/4]

template<unsigned int dim, typename T >
Matrix< dim, T >::Matrix ( const T(&)  p[dim][dim])
inline

Constructor from an array.

Parameters
parray with the coordinate of the point

Definition at line 141 of file Matrix.hpp.

◆ Matrix() [4/4]

template<unsigned int dim, typename T >
Matrix< dim, T >::Matrix ( )
inline

Default contructor.

Definition at line 153 of file Matrix.hpp.

Member Function Documentation

◆ get() [1/2]

template<unsigned int dim, typename T >
T & Matrix< dim, T >::get ( size_t  i,
size_t  j 
)
inline

Get coordinate.

Parameters
irow
jcolum
Returns
the value

Definition at line 68 of file Matrix.hpp.

◆ get() [2/2]

template<unsigned int dim, typename T >
T Matrix< dim, T >::get ( size_t  i,
size_t  j 
) const
inline

Get coordinate.

Parameters
irow
jcolums
Returns
the matrix element

Definition at line 55 of file Matrix.hpp.

◆ identity()

template<unsigned int dim, typename T >
static Matrix< dim, T > Matrix< dim, T >::identity ( )
inlinestatic

Identity matrix.

Returns
the identity matrix

Definition at line 161 of file Matrix.hpp.

◆ operator=()

template<unsigned int dim, typename T >
Matrix< dim, T > & Matrix< dim, T >::operator= ( const Matrix< dim, T > &  m)
inline

operator= between Matrix

Parameters
mMatrix

Definition at line 78 of file Matrix.hpp.

◆ zero()

template<unsigned int dim, typename T >
void Matrix< dim, T >::zero ( )
inline

Set to zero the point coordinate.

Definition at line 93 of file Matrix.hpp.

Field Documentation

◆ data

template<unsigned int dim, typename T >
type Matrix< dim, T >::data

structure that store the data of the point

Definition at line 42 of file Matrix.hpp.

◆ dims

template<unsigned int dim, typename T >
const unsigned int Matrix< dim, T >::dims = dim
static

dimension of the matrix (it is a square matrix)

Definition at line 181 of file Matrix.hpp.

◆ mat

template<unsigned int dim, typename T >
const unsigned int Matrix< dim, T >::mat = 0
static

Property id of the point.

Definition at line 45 of file Matrix.hpp.

◆ max_prop

template<unsigned int dim, typename T >
const unsigned int Matrix< dim, T >::max_prop = 1
static

1 property

Definition at line 178 of file Matrix.hpp.


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