<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
getri_uili.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
5//
6// This file is part of <T>LAPACK.
7// <T>LAPACK is free software: you can redistribute it and/or modify it under
8// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
9
10#ifndef TLAPACK_getri_uili_HH
11#define TLAPACK_getri_uili_HH
12
14#include "tlapack/blas/gemm.hpp"
17
18namespace tlapack {
19
38template <TLAPACK_MATRIX matrix_t>
40{
41 // check arguments
42 tlapack_check(nrows(A) == ncols(A));
43
44 // Invert the upper part of A; U
46 if (info != 0) return info;
47
48 // Invert the lower part of A; L which has 1 on the diagonal
50
51 // multiply U^{-1} and L^{-1} in place using ul_mult
52 ul_mult(A);
53
54 return 0;
55
56} // getri_uili
57
58} // namespace tlapack
59
60#endif // TLAPACK_getri_uili_HH
constexpr internal::LowerTriangle LOWER_TRIANGLE
Lower Triangle access.
Definition types.hpp:183
constexpr internal::UpperTriangle UPPER_TRIANGLE
Upper Triangle access.
Definition types.hpp:181
constexpr internal::UnitDiagonal UNIT_DIAG
The main diagonal is assumed to consist of 1's.
Definition types.hpp:217
constexpr internal::NonUnitDiagonal NON_UNIT_DIAG
The main diagonal is not assumed to consist of 1's.
Definition types.hpp:215
int ul_mult(matrix_t &A)
ul_mult computes the matrix product of an upper triangular matrix U and a lower triangular unital mat...
Definition ul_mult.hpp:34
int getri_uili(matrix_t &A)
getri_uili calculates the inverse of a general n-by-n matrix A
Definition getri_uili.hpp:39
int trtri_recursive(uplo_t uplo, Diag diag, matrix_t &C, const EcOpts &opts={})
TRTRI computes the inverse of a triangular matrix in-place Input is a triangular matrix,...
Definition trtri_recursive.hpp:48
#define tlapack_check(cond)
Throw an error if cond is false.
Definition exceptionHandling.hpp:98
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113