AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
FlatMatrix< T, Allocator > Class Template Reference

Dense matrix with row-wise storage in flat data vector. More...

#include <FlatMatrix.hpp>

Inherits vector< T, std::allocator< T > >.

Public Types

using value_type = T
 
using size_type = typename Super::size_type
 
using reference = typename Super::reference
 
using const_reference = typename Super::const_reference
 

Public Member Functions

 FlatMatrix ()=default
 Default constructor, creates an empty 0x0 matrix.
 
 FlatMatrix (size_type r, size_type c, value_type v={})
 
FlatMatrixoperator= (value_type s)
 Assign value s to all entries of the matrix.
 
void resize (size_type r, size_type c, value_type v={})
 Resizes the container to contain r x c elements. More...
 
size_type rows () const noexcept
 Return the number of rows of the matrix.
 
size_type cols () const noexcept
 Return the number of columns of the matrix.
 
AccessProxy< Super > operator[] (size_type row)
 
AccessProxy< Super const > operator[] (size_type row) const
 

Detailed Description

template<class T, class Allocator = std::allocator<T>>
class AMDiS::FlatMatrix< T, Allocator >

Dense matrix with row-wise storage in flat data vector.

Constructor & Destructor Documentation

◆ FlatMatrix()

FlatMatrix ( size_type  r,
size_type  c,
value_type  v = {} 
)
inline

Construct a new matrix with rows r and columns c and all values initialized by copies of value v.

Member Function Documentation

◆ operator[]()

AccessProxy< Super > operator[] ( size_type  row)
inline

Return accessor to the row of the matrix, see AccessProxy

◆ resize()

void resize ( size_type  r,
size_type  c,
value_type  v = {} 
)
inline

Resizes the container to contain r x c elements.

If the current rows*cols is greater than r*c, the container is reduced to its first r*c elements. If the current rows*cols is less than r*c, additional copies of value v are appended.

Referenced by BiLinearForm< RB, CB, T, Traits >::BiLinearForm().


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