TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
inv.hpp
#include "../basic_array.hpp"
#include "../basic_functions.hpp"
#include "../concepts.hpp"
#include "../exceptions.hpp"
#include "../lapack/getrf.hpp"
#include "../lapack/getri.hpp"
#include "../lapack/getrs.hpp"
#include "../layout/policies.hpp"
#include "../macros.hpp"
#include "../matrix_functions.hpp"
#include "../mem/address_space.hpp"
#include "../mem/policies.hpp"
#include "../traits.hpp"
#include <utility>

Detailed Description

Provides functions to compute the inverse of a matrix.

Definition in file inv.hpp.

Go to the source code of this file.

Functions

template<typename... A>
requires (nda::clef::is_any_lazy<A...>)
auto nda::clef::inv (A &&...__a)
 Lazy version of nda::linalg::inv.
template<Matrix M>
requires (get_algebra<M> == 'M' and is_blas_lapack_v<get_value_t<M>>)
auto nda::clef::inv (M const &m)
 Compute the inverse of an \( n \times n \) matrix \( \mathbf{M} \).
template<Matrix M>
requires (get_algebra<M> == 'M' and is_blas_lapack_v<get_value_t<M>>)
auto nda::linalg::inv (M const &m)
 Compute the inverse of an \( n \times n \) matrix \( \mathbf{M} \).
template<MemoryMatrix M>
requires (get_algebra<M> == 'M' and nda::mem::have_host_compatible_addr_space<M> and is_blas_lapack_v<get_value_t<M>>)
void nda::linalg::inv_in_place (M &&m)
 Compute the inverse of an \( n \times n \) matrix \( \mathbf{M} \).

Function Documentation

◆ inv()

template<Matrix M>
requires (get_algebra<M> == 'M' and is_blas_lapack_v<get_value_t<M>>)
auto nda::linalg::inv ( M const & m)

Compute the inverse of an \( n \times n \) matrix \( \mathbf{M} \).

The given matrix/view is not modified. It first makes a copy of the matrix/view and then

Warning
This function makes copies of the input arrays/views. When working on the device memory space, this may lead to runtime errors if the copying fails.
Template Parameters
Mnda::MemoryMatrix type.
Parameters
mInput matrix. The matrix \( \mathbf{M} \).
Returns
The inverse matrix \( \mathbf{M}^{-1} \).

Definition at line 141 of file inv.hpp.