guanaqo main
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::linalg::MatrixView< T > Struct Template Reference

#include <guanaqo/linalg/matrix-view.hpp>

Detailed Description

template<class T>
struct guanaqo::linalg::MatrixView< T >

Non-owning view of dense and various formats of sparse matrix.

Definition at line 15 of file matrix-view.hpp.

Collaboration diagram for guanaqo::linalg::MatrixView< T >:

Public Types

using Sparsity = sparsity::Sparsity
 Description of sparsity format.

Public Member Functions

 MatrixView ()
 Constructs an empty 0×0 dense matrix.
 MatrixView (std::span< const T > values, Sparsity sparsity)
 General constructor from flattened values and view of the sparsity pattern.
 MatrixView (std::span< const T > values, length_t rows, length_t cols, sparsity::Symmetry symmetry=sparsity::Symmetry::Unsymmetric)
 Dense matrix constructor (column-major).

Public Attributes

std::span< const T > values
 Non-owning view of the flattened array of (column-major) values.
Sparsity sparsity
 Non-owning view of the sparsity pattern of the matrix.

Member Typedef Documentation

◆ Sparsity

template<class T>
using guanaqo::linalg::MatrixView< T >::Sparsity = sparsity::Sparsity

Description of sparsity format.

Definition at line 17 of file matrix-view.hpp.

Constructor & Destructor Documentation

◆ MatrixView() [1/3]

template<class T>
guanaqo::linalg::MatrixView< T >::MatrixView ( )
inline

Constructs an empty 0×0 dense matrix.

Definition at line 20 of file matrix-view.hpp.

Here is the caller graph for this function:

◆ MatrixView() [2/3]

template<class T>
guanaqo::linalg::MatrixView< T >::MatrixView ( std::span< const T > values,
Sparsity sparsity )
inline

General constructor from flattened values and view of the sparsity pattern.

Parameters
valuesView of flattened array of (column-major) values.
sparsityView of the sparsity pattern (dense, CSC or COO).

Definition at line 25 of file matrix-view.hpp.

◆ MatrixView() [3/3]

template<class T>
guanaqo::linalg::MatrixView< T >::MatrixView ( std::span< const T > values,
length_t rows,
length_t cols,
sparsity::Symmetry symmetry = sparsity::Symmetry::Unsymmetric )
inline

Dense matrix constructor (column-major).

Parameters
valuesView of flattened array of (column-major) values.
rowsNumber of rows.
colsNumber of cols.
symmetrySymmetry of the matrix.

Definition at line 32 of file matrix-view.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ values

template<class T>
std::span<const T> guanaqo::linalg::MatrixView< T >::values

Non-owning view of the flattened array of (column-major) values.

Definition at line 37 of file matrix-view.hpp.

◆ sparsity

template<class T>
Sparsity guanaqo::linalg::MatrixView< T >::sparsity

Non-owning view of the sparsity pattern of the matrix.

Definition at line 39 of file matrix-view.hpp.


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