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

It store one non-zero element in the sparse matrix. More...

Detailed Description

template<typename T>
class triplet< T, PETSC_BASE >

It store one non-zero element in the sparse matrix.

Given a row, and a column, store a value

Definition at line 27 of file SparseMatrix_petsc.hpp.

#include <SparseMatrix_petsc.hpp>

Public Member Functions

PetscInt & row ()
 Return the row of the triplet.
 
PetscInt & col ()
 Return the colum of the triplet.
 
PetscScalar & value ()
 Return the value of the triplet.
 
 triplet (long int i, long int j, T val)
 Constructor from row, colum and value.
 

Private Attributes

PetscInt row_
 Row of the sparse matrix.
 
PetscInt col_
 Colum of the sparse matrix.
 
PetscScalar val_
 Value of the Matrix.
 

Constructor & Destructor Documentation

◆ triplet() [1/2]

template<typename T >
triplet< T, PETSC_BASE >::triplet ( long int  i,
long int  j,
val 
)
inline

Constructor from row, colum and value.

Parameters
irow
jcolum
valvalue

Definition at line 77 of file SparseMatrix_petsc.hpp.

◆ triplet() [2/2]

template<typename T >
triplet< T, PETSC_BASE >::triplet ( )
inline

Definition at line 85 of file SparseMatrix_petsc.hpp.

Member Function Documentation

◆ col()

template<typename T >
PetscInt & triplet< T, PETSC_BASE >::col ( )
inline

Return the colum of the triplet.

Returns
the colum index

Definition at line 55 of file SparseMatrix_petsc.hpp.

◆ row()

template<typename T >
PetscInt & triplet< T, PETSC_BASE >::row ( )
inline

Return the row of the triplet.

Returns
the row index

Definition at line 45 of file SparseMatrix_petsc.hpp.

◆ value()

template<typename T >
PetscScalar & triplet< T, PETSC_BASE >::value ( )
inline

Return the value of the triplet.

Returns
the value

Definition at line 65 of file SparseMatrix_petsc.hpp.

Field Documentation

◆ col_

template<typename T >
PetscInt triplet< T, PETSC_BASE >::col_
private

Colum of the sparse matrix.

Definition at line 33 of file SparseMatrix_petsc.hpp.

◆ row_

template<typename T >
PetscInt triplet< T, PETSC_BASE >::row_
private

Row of the sparse matrix.

Definition at line 30 of file SparseMatrix_petsc.hpp.

◆ val_

template<typename T >
PetscScalar triplet< T, PETSC_BASE >::val_
private

Value of the Matrix.

Definition at line 36 of file SparseMatrix_petsc.hpp.


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