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

Basic "Row" of the matrix, this stores the elements of the matrix in a line-oriented way. More...

#include <matrix.h>

Public Types

using Element = ElementImpl< T >
 

Public Member Functions

 RowImpl ()
 
void set_element (index_t j, const T &value)
 
void push_element (index_t j, const T &value)
 
index_t find (index_t j) const
 
bool exist (index_t j)
 
std::tuple< bool, T > get_element (index_t j) const
 
element (index_t e) const
 
index_t index (index_t e) const
 
T & operator[] (index_t i) const
 
index_t nb_elements () const
 

Private Member Functions

void reallocate (index_t new_capacity)
 
void grow ()
 

Private Attributes

std::unique_ptr< Element[] > elements_ {}
 
index_t nb_elements_ { 0 }
 
index_t capacity_ { 4 }
 

Detailed Description

template<typename T>
class RINGMesh::RowImpl< T >

Basic "Row" of the matrix, this stores the elements of the matrix in a line-oriented way.

Definition at line 81 of file matrix.h.

Member Typedef Documentation

◆ Element

template<typename T >
using RINGMesh::RowImpl< T >::Element = ElementImpl< T >

Definition at line 84 of file matrix.h.

Constructor & Destructor Documentation

◆ RowImpl()

template<typename T >
RINGMesh::RowImpl< T >::RowImpl ( )
inline

Definition at line 85 of file matrix.h.

Member Function Documentation

◆ element()

template<typename T >
T RINGMesh::RowImpl< T >::element ( index_t  e) const
inline

Definition at line 148 of file matrix.h.

◆ exist()

template<typename T >
bool RINGMesh::RowImpl< T >::exist ( index_t  j)
inline

Definition at line 125 of file matrix.h.

◆ find()

template<typename T >
index_t RINGMesh::RowImpl< T >::find ( index_t  j) const
inline

Definition at line 113 of file matrix.h.

◆ get_element()

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

Definition at line 137 of file matrix.h.

◆ grow()

template<typename T >
void RINGMesh::RowImpl< T >::grow ( )
inlineprivate

Definition at line 180 of file matrix.h.

◆ index()

template<typename T >
index_t RINGMesh::RowImpl< T >::index ( index_t  e) const
inline

Definition at line 154 of file matrix.h.

◆ nb_elements()

template<typename T >
index_t RINGMesh::RowImpl< T >::nb_elements ( ) const
inline

Definition at line 166 of file matrix.h.

◆ operator[]()

template<typename T >
T& RINGMesh::RowImpl< T >::operator[] ( index_t  i) const
inline

Definition at line 160 of file matrix.h.

◆ push_element()

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

Definition at line 102 of file matrix.h.

◆ reallocate()

template<typename T >
void RINGMesh::RowImpl< T >::reallocate ( index_t  new_capacity)
inlineprivate

Definition at line 172 of file matrix.h.

◆ set_element()

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

Definition at line 89 of file matrix.h.

Member Data Documentation

◆ capacity_

template<typename T >
index_t RINGMesh::RowImpl< T >::capacity_ { 4 }
private

Definition at line 190 of file matrix.h.

◆ elements_

template<typename T >
std::unique_ptr< Element[] > RINGMesh::RowImpl< T >::elements_ {}
private

Definition at line 188 of file matrix.h.

◆ nb_elements_

template<typename T >
index_t RINGMesh::RowImpl< T >::nb_elements_ { 0 }
private

Definition at line 189 of file matrix.h.


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