RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::SparseMatrix< T, light > Class Template Reference

#include <matrix.h>

Inheritance diagram for RINGMesh::SparseMatrix< T, light >:
RINGMesh::SparseMatrixImpl< T, T >

Public Types

using thisclass = SparseMatrix< T, light >
 
- Public Types inherited from RINGMesh::SparseMatrixImpl< T, T >
using Row = RowImpl< T >
 

Public Member Functions

 SparseMatrix (bool is_symetrical=false)
 
void set_element (index_t i, index_t j, const T &value)
 
void push_element (index_t i, index_t j, const T &value)
 
std::tuple< bool, T > get_element (index_t i, index_t j) const
 
get_element_in_line (index_t i, index_t e) const
 
- Public Member Functions inherited from RINGMesh::SparseMatrixImpl< T, T >
 SparseMatrixImpl (bool is_symmetrical=false)
 
 ~SparseMatrixImpl ()=default
 
bool exist (index_t i, index_t j) const
 
index_t get_nb_elements_in_line (index_t i) const
 gets number of elements within a row More...
 
index_t get_column_in_line (index_t i, index_t e) const
 gets the j that correspond to the given index within the row More...
 
std::tuple< bool, index_t > get_index_in_line (index_t i, index_t j) const
 gets the rows_ index corresponding to a given i-j couple More...
 
index_t ni () const
 
index_t nj () const
 
bool is_symmetrical () const
 
void build_matrix (index_t ni, index_t nj)
 
get_element_in_line (index_t i, index_t e) const
 

Additional Inherited Members

- Protected Attributes inherited from RINGMesh::SparseMatrixImpl< T, T >
std::unique_ptr< Row[] > rows_
 
index_t ni_
 
index_t nj_
 
bool is_symmetrical_
 

Detailed Description

template<typename T>
class RINGMesh::SparseMatrix< T, light >

specialization of SparseMatrix for MatrixType "light"

Definition at line 340 of file matrix.h.

Member Typedef Documentation

◆ thisclass

template<typename T >
using RINGMesh::SparseMatrix< T, light >::thisclass = SparseMatrix< T, light >

Definition at line 343 of file matrix.h.

Constructor & Destructor Documentation

◆ SparseMatrix()

template<typename T >
RINGMesh::SparseMatrix< T, light >::SparseMatrix ( bool  is_symetrical = false)
inlineexplicit

Definition at line 344 of file matrix.h.

Member Function Documentation

◆ get_element()

template<typename T >
std::tuple< bool, T > RINGMesh::SparseMatrix< T, light >::get_element ( index_t  i,
index_t  j 
) const
inline

Definition at line 389 of file matrix.h.

◆ get_element_in_line()

template<typename T >
T RINGMesh::SparseMatrix< T, light >::get_element_in_line ( index_t  i,
index_t  e 
) const
inline

get the value of e-element (index within the row, not in the matrix) on line i

Parameters
[in]irow index
[in]eindex within the row
Returns
value to retrieve

Definition at line 401 of file matrix.h.

◆ push_element()

template<typename T >
void RINGMesh::SparseMatrix< T, light >::push_element ( index_t  i,
index_t  j,
const T &  value 
)
inline

set the value of element i-j in the matrix without verifying if the element i-j already exists !!! BE CAREFULL

Parameters
[in]irow index
[in]jcolumn index
[in]valueto store

Definition at line 371 of file matrix.h.

◆ set_element()

template<typename T >
void RINGMesh::SparseMatrix< T, light >::set_element ( index_t  i,
index_t  j,
const T &  value 
)
inline

set the value of element i-j in the matrix

Parameters
[in]irow index
[in]jcolumn index
[in]valueto store

Definition at line 355 of file matrix.h.


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